lang: unification: Catch unification error on typed if expr
I found a case where we had two missing unification rules. Now fixed in the previous commits, and including this test to show I'm responsible. I've added the same test in two locations for redundancy and as an example.
This commit is contained in:
9
lang/interpret_test/TestAstFunc1/fail2/main.mcl
Normal file
9
lang/interpret_test/TestAstFunc1/fail2/main.mcl
Normal file
@@ -0,0 +1,9 @@
|
||||
import "fmt"
|
||||
$x str = if true { # should fail unification
|
||||
42
|
||||
} else {
|
||||
13
|
||||
}
|
||||
test "t1" {
|
||||
anotherstr => fmt.printf("hello %s", $x),
|
||||
}
|
||||
Reference in New Issue
Block a user