]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/OneLineMatch.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / OneLineMatch.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/OneLineMatch.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/OneLineMatch.scl
new file mode 100644 (file)
index 0000000..3f16b07
--- /dev/null
@@ -0,0 +1,6 @@
+// Tests that match cases can be given in the same line as the scrutinee\r
+data FooBar a = Foo a | Bar a\r
+extract x = match x with Foo v -> v ; Bar v -> v\r
+main = extract (Foo (3 :: Integer))\r
+--\r
+3
\ No newline at end of file