]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/CHR4.scl
Warn for existential variables in head pattern referred only once
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / CHR4.scl
1 main = ()
2   where
3     when ?x <- ?y
4     then True
5 --
6 3:10-3:12: Existential variable ?x is referred only once. Replace by _ if this is a wildcard.
7 3:10-3:18: Cannot solve the query.
8 3:16-3:18: Existential variable ?y is referred only once. Replace by _ if this is a wildcard.
9 --
10 import "Prelude"
11
12 main = getRef r
13   where
14     r = ref 1
15   
16     when True
17     then Foo ()
18     
19     when Foo _
20     then r := 2
21 --
22 2