Open
Description
Consider the following (contrived) program:
mutual {
fun bar() { 42 }
fun baz() { 17 }
fun foo(f){ f() }
}
foo(bar)
This should call foo, then bar,then return 42. And it does.
Now consider the following, alpha-renamed program.
mutual {
fun bar() { 42 }
fun baz() { 17 }
fun foo(baz){ baz() }
}
foo(bar)
This should call foo, then bar, then return 42. And it does not.
From looking at the generated IR, for some reason the bindings of mutually recursive functions in mutual blocks are being used instead of local parameter names when there is a conflict.
In some examples in #1136 this appears to be making something work inside a mutual block by accident that otherwise doesn't.