]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Forall3.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / Forall3.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Forall3.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/Forall3.scl
new file mode 100644 (file)
index 0000000..018a2a0
--- /dev/null
@@ -0,0 +1,11 @@
+\r
+data List a = Nil | Cons a (List a)\r
+\r
+build :: (forall l. l -> (a -> l -> l) -> l) -> List a\r
+build f = f Nil Cons\r
+\r
+main = build (\nil cons -> cons (1 :: Integer) (Cons (2 :: Integer) nil))\r
+                                             // ^^^^\r
+-- \r
+7:48-7:73: Expected <a> got <List Integer>.\r
+7:69-7:72: Expected <List Integer> got <a>.
\ No newline at end of file