Debian Codegraph @

lang/interpret_test/TestAstFunc2/speculative-call1.txtar

raw
1 -- main.mcl --
2 $f1 = func($x) { $x }
3 $f2 = func($x) { $x + $x }
4 $id = func($y) { $y }
5 $f = if ($id(true)) {$f1} else {$f2}
6
7 # $f is always $f1, so in theory, this call does not need a sub-graph.
8 # But does our optimization support this corner case yet?
9 $name = $f("foo")
10 test "${name}" {}
11 -- OUTPUT --
12 Vertex: test[foo]