How do you check specialization of functions with keyword arguments? Does this show that apparently they are automatically specialized?
julia> f_kwarg(; kwargs...) = (; kwargs...)
f_kwarg (generic function with 1 method)
julia> (@which f_kwarg(a=1, b=2.0, c=:three)).specializations
julia> @code_lowered f_kwarg(a=1, b=2.0, c=:three)
CodeInfo(
1 ─ kwargs... = Base.pairs(@_2)
│ %2 = Main.:(var"#f_kwarg#3")(kwargs..., @_3)
└── return %2
)
julia> (@which var"#f_kwarg#3"((a=1, b=2.0, c=:three), f_kwarg)).specializations
julia> f_kwarg(a=1, b=2.0, c=:three)
(a = 1, b = 2.0, c = :three)
julia> (@which f_kwarg(a=1, b=2.0, c=:three)).specializations
Core.TypeMapEntry(nothing, Tuple{var"#f_kwarg##kw",NamedTuple{(:a, :b, :c),Tuple{Int64,Float64,Symbol}},typeof(f_kwarg)}, nothing, svec(), 0x0000000000000001, 0xffffffffffffffff, MethodInstance for (::var"#f_kwarg##kw")(::NamedTuple{(:a, :b, :c),Tuple{Int64,Float64,Symbol}}, ::typeof(f_kwarg)), true, true, false)
julia> (@which var"#f_kwarg#3"((a=1, b=2.0, c=:three), f_kwarg)).specializations
Core.TypeMapEntry(nothing, Tuple{var"##f_kwarg#3",Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:a, :b, :c),Tuple{Int64,Float64,Symbol}}},typeof(f_kwarg)}, nothing, svec(), 0x0000000000000001, 0xffffffffffffffff, MethodInstance for #f_kwarg#3(::Base.Iterators.Pairs{Symbol,Any,Tuple{Symbol,Symbol,Symbol},NamedTuple{(:a, :b, :c),Tuple{Int64,Float64,Symbol}}}, ::typeof(f_kwarg)), true, true, false)