The Ordering and DAG detection code is challenging because we need Ordering to do SetScope, but Ordering itself needs to know about scopes. This improved variant should hopefully catch all the scenarios of identically named variables causing invalid loops. Co-authored-by: Samuel Gélineau <gelisam@gmail.com>
10 lines
173 B
Plaintext
10 lines
173 B
Plaintext
-- main.mcl --
|
|
# test that ordering works and doesn't produce a dag in this tricky scenario
|
|
func id($x) {
|
|
$x
|
|
}
|
|
$x = id("hello")
|
|
test $x {}
|
|
-- OUTPUT --
|
|
Vertex: test[hello]
|