-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompiler:inferenceType inferenceType inferenceregression 1.10Regression in the 1.10 releaseRegression in the 1.10 release
Description
julia> begin
f(x::Int) = 1
f(x::Bool) = 2
applyf(container::AbstractVector) = f(container[1])
callapplyf(container) = applyf(container)
end
callapplyf (generic function with 1 method)
julia> callapplyf(Any[1])
1
julia> mi = only(Base.specializations(only(methods(applyf))))
MethodInstance for applyf(::Vector{Any})
julia> mi.backedges
3-element Vector{Any}:
MethodInstance for callapplyf(::Vector{Any})
Tuple{typeof(applyf), AbstractVector}
MethodInstance for callapplyf(::Vector{Any})
That last pair,
Tuple{typeof(applyf), AbstractVector}
MethodInstance for callapplyf(::Vector{Any})
is the kind of backedge you'd get if callapplyf
were implemented as
callapplyf(container) = invoke(applyf, Tuple{AbstractVector}, container)
The fact that it's here seems to be a bug.
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompiler:inferenceType inferenceType inferenceregression 1.10Regression in the 1.10 releaseRegression in the 1.10 release