]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/RecursionBug.scl
Fixed an error with recursive definition that is not exported or used
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / RecursionBug.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/RecursionBug.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/RecursionBug.scl
new file mode 100644 (file)
index 0000000..3a6ab24
--- /dev/null
@@ -0,0 +1,16 @@
+module {
+    export = [main]
+}
+
+import "Prelude"
+
+data Path = EmptyPath | ConsPath String Path
+
+showR :: Path -> String
+showR EmptyPath = "@"
+showR (ConsPath h EmptyPath) = h
+showR (ConsPath h t) = "\(h)-\(showR t)"
+
+main = "Hello world!"
+--
+Hello world!
\ No newline at end of file