I much appreciate workflow made available by Juno while developing a module (see atom-julia-client/workflow.md at master · JunoLab/atom-julia-client · GitHub). But I encountered this silly situation:
module abc
function f(a::Vector{Int})
s = 0
for x in a[2:end]
s += x*x
end
end
end
When the cursor is on the end
of function f
, I see Main
on the status bar, no more Main/abc
. And if I add a new function alpha
at the end of my module, and evaluate its definition as usual, I can’t use it:
abc.alpha(3) UndefVarError: alpha not defined
I was very perturbed (because I use daily module’s development with Juno), until I realized that end
in a[2:end]
was misinterpreted by Juno, and ruined following scopes – of course my module was a little larger, and I needed some time to discover this bug, sigh.