diff graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/CreateCastTest.java @ 13533:b466199f19e1

Truffle-DSL: fixed bug when using @CreateCast with children arrays.
author Christian Humer <christian.humer@gmail.com>
date Tue, 07 Jan 2014 20:16:01 +0100
parents 1f870eaf1e96
children
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/CreateCastTest.java	Tue Jan 07 20:06:27 2014 +0100
+++ b/graal/com.oracle.truffle.api.dsl.test/src/com/oracle/truffle/api/dsl/test/CreateCastTest.java	Tue Jan 07 20:16:01 2014 +0100
@@ -28,6 +28,7 @@
 import com.oracle.truffle.api.dsl.test.CreateCastTestFactory.CreateCastNode1Factory;
 import com.oracle.truffle.api.dsl.test.CreateCastTestFactory.CreateCastNode2Factory;
 import com.oracle.truffle.api.dsl.test.CreateCastTestFactory.CreateCastNode3Factory;
+import com.oracle.truffle.api.dsl.test.TypeSystemTest.ChildrenNode;
 import com.oracle.truffle.api.dsl.test.TypeSystemTest.TestRootNode;
 import com.oracle.truffle.api.dsl.test.TypeSystemTest.ValueNode;
 import com.oracle.truffle.api.nodes.*;
@@ -87,12 +88,11 @@
         }
     }
 
-    @NodeChild(value = "a", type = ValueNode[].class)
-    abstract static class CreateCastNode3 extends ValueNode {
+    abstract static class CreateCastNode3 extends ChildrenNode {
 
         int invocations = 0;
 
-        @CreateCast("a")
+        @CreateCast("children")
         public ValueNode[] createCast(ValueNode[] node) {
             invocations++;
             return node;