v1.12 throws UndefVarError: not defined in local scope
for variable renamed in function before being captured by a closure
#57141
Labels
bug
Indicates an unexpected problem or unintended behavior
compiler:lowering
Syntax lowering (compiler front end, 2nd stage)
regression 1.12
Regression in the 1.12 release
I've not yet been able to create a minimal reproduction of this that doesn't depend on a private package (sorry), buti can at least start a bisect to try to find the offending commit.[Edit: better repro in message below]
In a private package, which has a function like
Calling the function like
throws
The error disappears if the function is marked
@noinline
or the variable isn't renamed in the function, i.e.or
The text was updated successfully, but these errors were encountered: