julia
fa4972db - Make `haskey(::@Kwargs{item::Bool}, :item)` constant-fold (#59320)

Commit
254 days ago
Make `haskey(::@Kwargs{item::Bool}, :item)` constant-fold (#59320) Resolves https://github.com/JuliaLang/julia/issues/59269. ~~Makes https://github.com/JuliaLang/julia/issues/59292 somewhat worse by doubling-down on the same assumptions.~~ ~~We should straighten out that issue properly, but I don't see any reason not to get better inference in the mean time for the very common `@Kwargs` case.~~ We are already relying on those assumptions in Base (as that issue demonstrates), and @JeffBezanson says that this functionality wasn't intended to be supported: > I think the use case for it is picking not a subset, but alternate key set, specifically linear or cartesian indices for arrays. [...] So go ahead and add that haskey method **edit:** now also resolves https://github.com/JuliaLang/julia/issues/59292.
Author
Parents
Loading