]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/IndentationAndParenthesis.scl
Automatic execution of SCL tests in Maven
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / IndentationAndParenthesis.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/IndentationAndParenthesis.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/IndentationAndParenthesis.scl
new file mode 100644 (file)
index 0000000..3a8dc3d
--- /dev/null
@@ -0,0 +1,16 @@
+// The last character of the program is an extra closing parenthesis\r
+data List a = Nil | Cons a (List a)\r
+\r
+first Nil = 0\r
+first (Cons x _) = x\r
+\r
+reverse l = reverseAux Nil l \r
+  where\r
+    reverseAux accum Nil = accum\r
+    reverseAux accum (Cons h t) = reverseAux (Cons h accum) t    \r
+\r
+main = first (reverse l) \r
+  where\r
+    l = Cons 1 (Cons 2 (Cons 3 Nil)))\r
+--\r
+14:37-14:38: No corresponding opening parenthesis for ')'.
\ No newline at end of file