]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/CHR4.scl
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / CHR4.scl
index a2abc6eb50e8dc704f10d5223b62a74557e6f531..90b82e79a016d8c8db7b6eea99e19cf09a834dc0 100644 (file)
@@ -3,4 +3,20 @@ main = ()
     when ?x <- ?y
     then True
 --
+3:10-3:12: Existential variable ?x is referred only once. Replace by _ if this is a wildcard.
 3:10-3:18: Cannot solve the query.
+3:16-3:18: Existential variable ?y is referred only once. Replace by _ if this is a wildcard.
+--
+import "Prelude"
+
+main = getRef r
+  where
+    r = ref 1
+  
+    when True
+    then Foo ()
+    
+    when Foo _
+    then r := 2
+--
+2