]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/MatchingWithoutTypeAnnotations.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / MatchingWithoutTypeAnnotations.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/MatchingWithoutTypeAnnotations.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/MatchingWithoutTypeAnnotations.scl
new file mode 100644 (file)
index 0000000..80d1477
--- /dev/null
@@ -0,0 +1,10 @@
+\r
+data List a = Nil | Cons a (List a)\r
+\r
+//first :: List Integer -> Integer\r
+first Nil = 0 :: Integer\r
+first (Cons x _) = x\r
+\r
+main = first (Cons (9 :: Integer) (Cons (8 :: Integer) Nil))\r
+--\r
+9
\ No newline at end of file