-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad warnings when shadowing _ (0.6) #20931
Comments
Resolved: we're probably not going to be able to fix this in 0.6 but we can add a line number and just tell people to use a different name in these cases. |
Leaving it on 0.6 until the line number is printed. |
Note that this won't be a problem on 1.0 when the deprecation goes away, so it's unclear that a fix beyond reporting a line number is necessary. |
It causes typing issues. In the function below, function foo(n)
s = 0.0
for _ in 1:n
function f(x)
_ = "hey"
end
s += 1.0
end
return s
end I know that's true for any variable name, but |
Their values are not yet discarded. |
This may get fixed in the 0.6.x time frame, but since it will go away in 1.0 when this deprecation is removed, it's a fairly low priority. Sorry for the annoyance here, but it's fairly hard to fix and since it's a temporary problem, the effort is a bit hard to justify. |
The warnings appear only inside closures.
The text was updated successfully, but these errors were encountered: