Issue filed. https://github.com/JuliaLang/julia/issues/7234
Let's get back to an earlier discussion. Having mulled over the points so far. I have conceded that it's heavy-handed to warn omission of global if we are not trying to change them, especially if the global name is unambiguous. So I have taken out the warning. Instead, assignment to a variable name which overlaps with a global "may" raise a flag. I have taken some "big-boy" assumption that if the name is a short one e.g. "idx", "name" etc, the creator of those globals probably used it as a throwaway variable (to generate other globals using macro, etc) and would not care about subsequent overlap. I hope this behavior makes more sense. On Friday, June 13, 2014 2:12:11 AM UTC+7, Mauro wrote: > > I was hoping that someone more knowledgeable would respond, but no luck... > > I think this is a bug. Could you file an issue? > > This also happens with a (;) block, a let-block and inside functions: > > julia> function fn() > foo = 1 > bar() = (foo=foo+1; foo) > bar() > end > julia> fn() > 2 > > (but not inside a module-block) > > This closed issue https://github.com/JuliaLang/julia/issues/4645 > discussed an example similar to this but without the begin-block. You > should reference it. > > (If this is not a bug, why?) > > >
