From 1fc940ea8ef3c1553b8e9f4f8eb49480b7540f1a Mon Sep 17 00:00:00 2001
From: stepan <stepan.sindelar@oracle.com>
Date: Wed, 14 Sep 2016 17:39:47 +0200
Subject: [PATCH] RLanguage does not override isObject

---
 .../src/com/oracle/truffle/r/runtime/data/RLanguage.java     | 5 -----
 .../src/com/oracle/truffle/r/test/ExpectedTestOutput.test    | 4 ++++
 .../oracle/truffle/r/test/builtins/TestBuiltin_oldClass.java | 1 +
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RLanguage.java b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RLanguage.java
index eaa93ed3a2..275b3ad910 100644
--- a/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RLanguage.java
+++ b/com.oracle.truffle.r.runtime/src/com/oracle/truffle/r/runtime/data/RLanguage.java
@@ -190,11 +190,6 @@ public class RLanguage extends RSharingAttributeStorage implements RAbstractCont
         return RDataFactory.createStringVector(RRuntime.CLASS_LANGUAGE);
     }
 
-    @Override
-    public boolean isObject(RAttributeProfiles attrProfiles) {
-        return false;
-    }
-
     @Override
     public RLanguage copy() {
         RLanguage l = new RLanguage(getRep(), this.length);
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test
index 0c1702f82a..101468889a 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/ExpectedTestOutput.test
@@ -32282,6 +32282,10 @@ logical(0)
 #argv <- list(c('  \036 The other major change was an error for asymmetric loss matrices,', '    prompted by a user query.  With L=loss asymmetric, the altered', '    priors were computed incorrectly - they were using L\' instead of L.', '    Upshot - the tree would not not necessarily choose optimal splits', '    for the given loss matrix.  Once chosen, splits were evaluated', '    correctly.  The printed “improvement” values are of course the', '    wrong ones as well.  It is interesting that for my little test', '    case, with L quite asymmetric, the early splits in the tree are', '    unchanged - a good split still looks good.'));nzchar(argv[[1]]);
 [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
 
+##com.oracle.truffle.r.test.builtins.TestBuiltin_oldClass.testGetClass
+#{ f <- quote(foo(42)); class(f)<-'myclass'; oldClass(f); }
+[1] "myclass"
+
 ##com.oracle.truffle.r.test.builtins.TestBuiltin_oldClass.testGetClass
 #{ oldClass(NULL) }
 NULL
diff --git a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_oldClass.java b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_oldClass.java
index 277eb8a033..40856bd5f6 100644
--- a/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_oldClass.java
+++ b/com.oracle.truffle.r.test/src/com/oracle/truffle/r/test/builtins/TestBuiltin_oldClass.java
@@ -126,5 +126,6 @@ public class TestBuiltin_oldClass extends TestBase {
     public void testGetClass() {
         assertEval("{ x<-1; oldClass(x) }");
         assertEval("{ oldClass(NULL) }");
+        assertEval("{ f <- quote(foo(42)); class(f)<-'myclass'; oldClass(f); }");
     }
 }
-- 
GitLab