You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let
function wat()
a::String = "wat"
println(a)
end
a::String = "me"
wat()
end
This will throw an exception telling me
ERROR: LoadError: syntax: type of "a" declared in inner scope
while loading /wat.jl, in expression starting on line 1
Which is really not helpful at all. Line 1? Wow, thanks! 'syntax: type of "a" declared in inner scope' that tells me nothing, what is wrong with that. It sounds like there are some words missing e. g. " is not allowed because X".
Now my real issue here is, why is this not legal? Why can I not have a function with a local variables whos name is equal to one from outside the function?
The text was updated successfully, but these errors were encountered:
This will throw an exception telling me
Which is really not helpful at all. Line 1? Wow, thanks! 'syntax: type of "a" declared in inner scope' that tells me nothing, what is wrong with that. It sounds like there are some words missing e. g. " is not allowed because X".
Now my real issue here is, why is this not legal? Why can I not have a function with a local variables whos name is equal to one from outside the function?
The text was updated successfully, but these errors were encountered: