Skip to content
Snippets Groups Projects
Commit 1a279978 authored by Adam Welc's avatar Adam Welc
Browse files

Minor S4 fix.

parent f4cb0f71
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ public enum RType {
DefunctReal("real", -1),
DefunctSingle("single", -1),
ExternalPtr("externalptr", -1),
S4Object("s4object", -1),
S4Object("S4", -1),
Connection("connection", -1),
Dots("...", -1);
......@@ -160,7 +160,7 @@ public enum RType {
return DefunctSingle;
case "externalptr":
return ExternalPtr;
case "s4object":
case "S4":
return S4Object;
case "connection":
return Connection;
......
......@@ -120,6 +120,10 @@ Slot "j":
[1] 42
 
 
##com.oracle.truffle.r.test.S4.TestS4.testAllocation#
#{ setClass("foo", representation(j="numeric")); typeof(new("foo", j=42)) }
[1] "S4"
##com.oracle.truffle.r.test.S4.TestS4.testClassCreation#
#{ setClass("foo"); setClass("bar", representation(j = "numeric"), contains = "foo"); is.null(getClass("foo")@prototype) }
[1] FALSE
......@@ -85,7 +85,7 @@ public class TestS4 extends TestRBase {
public void testAllocation() {
assertEval("{ new(\"numeric\") }");
assertEval("{ setClass(\"foo\", representation(j=\"numeric\")); new(\"foo\", j=42) }");
assertEval("{ setClass(\"foo\", representation(j=\"numeric\")); typeof(new(\"foo\", j=42)) }");
}
@Test
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment