-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
types and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch
Description
Reported on discourse:
using Graphs
abstract type MyAbstract end
struct Composite{T <: MyAbstract,R <: MyAbstract} <: MyAbstract
a::T
av::Vector{Union{T,R}}
end
struct Leaf <: MyAbstract
b
end
Leaf() = Leaf(1)
Composite{T,R}() where {T<:MyAbstract,R<:MyAbstract} = Composite{T,R}(T(),Vector{Union{T,R}}([T()]))
randcomp1(firsttype::Type) = Composite{firsttype, Composite}()
randcomp1(Leaf)
crashes 1.7.2 with
Internal error: encountered unexpected error in runtime:
StackOverflowError()
intersect at /cygdrive/c/buildbot/worker/package_win64/build/src\subtype.c:2960
and seems to work on nightly.
Metadata
Metadata
Assignees
Labels
types and dispatchTypes, subtyping and method dispatchTypes, subtyping and method dispatch