Skip to content
Snippets Groups Projects
Commit 8f1431e7 authored by Lukas Stadler's avatar Lukas Stadler
Browse files

Merge pull request #516 in G/fastr from ~ADAM.WELC_ORACLE.COM/fastr:bugfix/s4_fix to master

* commit '1a279978':
  Minor S4 fix.
parents f4cb0f71 1a279978
No related branches found
No related tags found
No related merge requests found
...@@ -44,7 +44,7 @@ public enum RType { ...@@ -44,7 +44,7 @@ public enum RType {
DefunctReal("real", -1), DefunctReal("real", -1),
DefunctSingle("single", -1), DefunctSingle("single", -1),
ExternalPtr("externalptr", -1), ExternalPtr("externalptr", -1),
S4Object("s4object", -1), S4Object("S4", -1),
Connection("connection", -1), Connection("connection", -1),
Dots("...", -1); Dots("...", -1);
...@@ -160,7 +160,7 @@ public enum RType { ...@@ -160,7 +160,7 @@ public enum RType {
return DefunctSingle; return DefunctSingle;
case "externalptr": case "externalptr":
return ExternalPtr; return ExternalPtr;
case "s4object": case "S4":
return S4Object; return S4Object;
case "connection": case "connection":
return Connection; return Connection;
......
...@@ -120,6 +120,10 @@ Slot "j": ...@@ -120,6 +120,10 @@ Slot "j":
[1] 42 [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# ##com.oracle.truffle.r.test.S4.TestS4.testClassCreation#
#{ setClass("foo"); setClass("bar", representation(j = "numeric"), contains = "foo"); is.null(getClass("foo")@prototype) } #{ setClass("foo"); setClass("bar", representation(j = "numeric"), contains = "foo"); is.null(getClass("foo")@prototype) }
[1] FALSE [1] FALSE
...@@ -85,7 +85,7 @@ public class TestS4 extends TestRBase { ...@@ -85,7 +85,7 @@ public class TestS4 extends TestRBase {
public void testAllocation() { public void testAllocation() {
assertEval("{ new(\"numeric\") }"); assertEval("{ new(\"numeric\") }");
assertEval("{ setClass(\"foo\", representation(j=\"numeric\")); new(\"foo\", j=42) }"); assertEval("{ setClass(\"foo\", representation(j=\"numeric\")); new(\"foo\", j=42) }");
assertEval("{ setClass(\"foo\", representation(j=\"numeric\")); typeof(new(\"foo\", j=42)) }");
} }
@Test @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