Skip to content

haskey(::@Kwargs{item::Bool}, :item) does not constant-fold #59269

@oscardssmith

Description

@oscardssmith

The following (fairly simplified example) loses

using OrdinaryDiffEqRosenbrock, OrdinaryDiffEqCore, ForwardDiff, ADTypes

code_typed(OrdinaryDiffEqCore.:(var"#remake#8"), (Base.Pairs{Symbol, ADTypes.AutoForwardDiff{1, ForwardDiff.Tag{Nothing, Float64}}, Tuple{Symbol}, @NamedTuple{autodiff::ADTypes.AutoForwardDiff{1, ForwardDiff.Tag{Nothing, Float64}}}}, typeof(SciMLBase.remake), OrdinaryDiffEqRosenbrock.Rodas5P{1, Nothing, Nothing, Nothing, Nothing, true, nothing, Nothing, Nothing}))

returns a poorly inferred Rodas5P because the OrdinaryDiffEqCore.var"#remake#8 (in src/algirithms.jl:54) is getting called with badly inferred kwargs even though we specifically are calling it with a very well inferred namedTuple.

@serenity4 I was told by @topolarity that you might be interested in this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions