]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/SharedTypeVariable.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / SharedTypeVariable.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/SharedTypeVariable.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/SharedTypeVariable.scl
new file mode 100644 (file)
index 0000000..19fd565
--- /dev/null
@@ -0,0 +1,8 @@
+// Idea here is that the type variable in the top level type annotation\r
+// and the type annotation in the expression should be the same type.\r
+id :: a -> a\r
+id x = (x :: a)\r
+\r
+main = id "OK"\r
+--\r
+OK
\ No newline at end of file