Hello,
I upgraded Julia from version 0.63 to version 1.4. To compose new and default Kwargs in Julia v0.63 I used the following function:
function foo(; kwargs...)
defaults = (; x="default")
merge!(defaults, kwargs)
return defaults
end
new = (; x="new")
kwargs = foo(;x="new")
When I try to use the same method in Julia 1.4 the following message rises
MethodError: no method matching merge!(::NamedTuple{(:x,),Tuple{String}}, ::Base.Iterators.Pairs{Symbol,String,Tuple{Symbol},NamedTuple{(:x,),Tuple{String}}})
I suppose that the merge function is not well defined for this type of variable.
Do you suggest a way to do it?