-
-
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
deprecate const
on local variables, which used to be ignored
#23259
Conversation
5ed2f45
to
cdd6da5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Travis macOS failure suggests that something in
let
local MatOrNot, my_func, M
MatOrNot{T} = Union{AbstractMatrix{T}, Vector{Union{}}}
my_func(A::MatOrNot{T}, B::MatOrNot{T}, C::MatOrNot{T}) where {T<:Real} = 0
M = [ 2. 1. ; 1. 1. ]
@test my_func(Union{}[], M, M) == 0
end
from test/core.jl (around line 849) triggers the depwarn. Perhaps the MatOrNot{T} = Union{...}
?
cdd6da5
to
ebceab8
Compare
add a todo note in deprecated.jl so this gets removed at the right time? |
ebceab8
to
bd4688f
Compare
Technically, since the behavior of that would change if local const was enforced (in that you would cease to be able to reassign the name), so I guess the only real choice in this PR is to change it. |
I think we're fine here. Both
|
They wre ignored anyway and have been deprecated in JuliaLang/julia#23259.
part of #5148