You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix nospecializing Functions in Union{Nothing,Function} params (#59327)
Fixes#59326.
Change the logic that decides not to specialize a function parameter
based on whether or not the supplied argument is a Function, and that
function is not used, so that it will still work if the SpecType is a
Union{Function,Nothing} or any other union that contains a Function.
The logic is changed from a hardcoded rule of `type_i == Function ||
type_i == Any || type_i == Base.Callable` to `type_i >: Function`.
This covers all of the above cases, but also includes custom
`Union{Function, T}` such as `Union{Function, Nothing}`.
---------
Co-authored-by: Nick Robinson <[email protected]>
Co-authored-by: Jameson Nash <[email protected]>
0 commit comments