]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/PatternError.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / PatternError.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/PatternError.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/PatternError.scl
new file mode 100644 (file)
index 0000000..ce417af
--- /dev/null
@@ -0,0 +1,22 @@
+import "Prelude"\r
+\r
+data CP = CP Integer String\r
+\r
+//cpName :: CP -> String\r
+cpName CP cp name = name\r
+\r
+connectionPoints :: Integer -> [(CP, CP)]\r
+connectionPoints n = []\r
+\r
+hasTerminalProblems :: Integer -> Boolean\r
+hasTerminalProblems uc =\r
+    let cps = connectionPoints uc\r
+        cpCount = length cps\r
+        dcps = map snd cps\r
+        dnames = map cpName dcps\r
+        dcpNameCount = length $ unique $ sort dnames\r
+    in cpCount != dcpNameCount\r
+\r
+main = "Not OK"\r
+--\r
+6:8-6:10: ???
\ No newline at end of file