lang: Allow more than one possible error in tests
There are some rare situations with completely symmetrical graphs which mean that there isn't a "more correct" error. This is due to the annoying map iteration non-determinism, and so instead of fighting to remove every bit of that, let's just accept more than one error here.
This commit is contained in:
@@ -18,3 +18,4 @@ $out2 = $add($val) # hellohello
|
||||
test [fmt.printf("%s + %s is %s", $val, $val, $out2),] {} # simple concat
|
||||
-- OUTPUT --
|
||||
# err: errUnify: unify error with: topLevel(singleton(func(x) { call:_operator(str("+"), var(x), var(x)) })): type error: str != int
|
||||
# err: errUnify: unify error with: topLevel(singleton(func(x) { call:_operator(str("+"), var(x), var(x)) })): type error: int != str
|
||||
|
||||
@@ -11,3 +11,4 @@ test "test2" {
|
||||
}
|
||||
-- OUTPUT --
|
||||
# err: errUnify: unify error with: topLevel(singleton(func(x) { var(x) })): type error: str != int
|
||||
# err: errUnify: unify error with: topLevel(singleton(func(x) { var(x) })): type error: int != str
|
||||
|
||||
@@ -13,3 +13,4 @@ class use_polymorphically($id) {
|
||||
include use_polymorphically(func($x) {$x})
|
||||
-- OUTPUT --
|
||||
# err: errUnify: unify error with: topLevel(singleton(func(x) { var(x) })): type error: str != int
|
||||
# err: errUnify: unify error with: topLevel(singleton(func(x) { var(x) })): type error: int != str
|
||||
|
||||
Reference in New Issue
Block a user