pgraph, lang: ast: Fix failing tests due to non-deterministic topo sort
This causes inconsistent type unification when running our tests. It's a bad user experience too.
This commit is contained in:
@@ -17,4 +17,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
|
||||
|
||||
@@ -10,4 +10,4 @@ test "test2" {
|
||||
anotherstr => $id("hello"),
|
||||
}
|
||||
-- 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
|
||||
|
||||
@@ -12,4 +12,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