]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/JavaConstructors.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / JavaConstructors.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/JavaConstructors.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/JavaConstructors.scl
new file mode 100644 (file)
index 0000000..d3ee020
--- /dev/null
@@ -0,0 +1,11 @@
+\r
+@JavaType "org.simantics.scl.runtime.tuple.Tuple3"\r
+data Tuple3 a b c =\r
+    @FieldNames [c0, c1, c2] \r
+    Tuple3 a b c\r
+    \r
+toTuple (Tuple3 x y z) = (x, y, z)\r
+\r
+main = toTuple (Tuple3 "x" "y" "z")\r
+--\r
+(x,y,z)
\ No newline at end of file