Variable incorrectly perisists in loop when I redefine a print method #52664
Labels
compiler:lowering
Syntax lowering (compiler front end, 2nd stage)
kind:bug
Indicates an unexpected problem or unintended behavior
parser
Language parsing and surface syntax
I asked about this on the discourse and it was recommended I open an issue:
https://discourse.julialang.org/t/redefining-print-method-changes-variable-scoping-in-loop/108010
Essentially the idx_last variable persists when it should not.
If I comment out the Base.show() line then I correctly see
UndefVarError: idx_last not defined
.This happened for me using versions 10.10.0-rc2 and 1.10.0. Apparently the expected behavior was seen using v1.9.4 on windows. Also, from the discourse you can see we verified
idx_last
is never in the global scope. My versioninfo:The text was updated successfully, but these errors were encountered: