Closed
Description
Looking at why some code wasn't loading correctly, I found this edge list isn't being generated correctly for nteltype(::Type)
with 3 entries present for it where there should only be at most one of a different kind (method table rather than call and widened invoke given the resulting code), though preferable this would be zero edges:
julia> code_typed(eltype, (Type{A} where A<:(NamedTuple{names, T} where T<:Tuple{Vararg{Any, N}} where names where N),))[2][1].edges
7-element Vector{Any}:
2
Tuple{typeof(Base.nteltype), Type{A} where A<:(NamedTuple{names, T} where {N, names, T<:NTuple{N, Any}})}
CodeInstance for MethodInstance for Base.nteltype(::Type{NamedTuple{names, T}} where names) where {N, T<:NTuple{N, Any}}
nteltype(::Type) @ Base namedtuple.jl:230
MethodInstance for Base.nteltype(::Type{A} where A<:(NamedTuple{names, T} where {N, names, T<:NTuple{N, Any}}))
Tuple{typeof(Base.nteltype), Type}
MethodInstance for Base.nteltype(::Type)
julia> code_typed(eltype, (Type{A} where A<:(NamedTuple{names, T} where T<:Tuple{Vararg{Any, N}} where names where N),))[2][1]
CodeInfo(
@ namedtuple.jl:229 within `eltype`
1 ─ %1 = $(Expr(:static_parameter, 1))::Type{A} where A<:(NamedTuple{names, T} where {N, names, T<:NTuple{N, Any}})
│ %2 = dynamic Base.nteltype(%1)::Any
└── return %2
)
Metadata
Metadata
Assignees
Labels
No labels