-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
types and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch
Description
EDIT: MWE from below
julia> typeintersect((Tuple{Type{T},Array{Union{T,Missing},N}} where {T,N}),
(Tuple{Type{T},Array{Union{T,Nothing},N}} where {T,N}))
ERROR: StackOverflowError
Original text:
If I do
for U in (:(Union{T, Missing}), :(Union{T, Nothing}),)
@eval function bar(::Type{T}, xs::Array{$U,N}) where {T,N}
T
end
endThen julia SIGSEGV's (Address boundary error)
When I do:
@eval function bazz(::Type{T}, xs::Array{Union{T,Missing},N}) where {T,N}
T
endI get a StackOverflowError
When I do:
function bazz(::Type{T}, xs::Array{Union{T,Missing},N}) where {T,N}
T
end
I am back to crashing out with SIGSEGV's (Address boundary error)
But if i do:
function bazz(::Type{<:T},xs::Array{Union{T,Missing},N}) where {T,N}
T
end
then it is fine.
But that is a different expression
as is
function bazz(::Type{T},xs::Array{<:Union{T,Missing},N}) where {T,N}
T
end
This is on Version 1.6.0-DEV.184 (2020-06-06)
Metadata
Metadata
Assignees
Labels
types and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch