-
-
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
Undefined typevar when it is clearly defined #55933
Labels
bug
Indicates an unexpected problem or unintended behavior
types and dispatch
Types, subtyping and method dispatch
Comments
Seems reasonable to me? This is where |
Howso? Consider this code which similarly crashes. I would expect this to return nothing. julia> T = (Vector{Tuple{Code}} where {Code<:Integer})
Array{Tuple{Code}, 1} where Code<:Integer
julia> @inline ptreltype(x) = nothing
ptreltype (generic function with 1 method)
julia> @inline ptreltype(::Type{Array{T,N}}) where {T,N} = T
ptreltype (generic function with 2 methods)
julia> ptreltype(T)
ERROR: UndefVarError: `T` not defined
Stacktrace:
[1] ptreltype(::Type{Array{Tuple{Code}, 1} where Code<:Integer})
@ Main ./REPL[3]:1
[2] top-level scope
@ REPL[4]:1 |
It appears to be fixed in v1.11
|
Any chance whatever the fix was can get backported? |
gentle bump for backporting the fix |
Someone needs to identify the fix. |
I've bisected the commits and found that ebae716 is the commit that fixed the bug. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Indicates an unexpected problem or unintended behavior
types and dispatch
Types, subtyping and method dispatch
On Julia 1.10.5
Not entirely sure what I would expect here (actually I would expect a methoderror), but definitely not this.
cc @mofeing
The text was updated successfully, but these errors were encountered: