LabelledArrays.jl
LabelledArrays.jl copied to clipboard
Labelled Array Constructors do not promote to dual numbers
julia> using ForwardDiff, LabelledArrays
julia> SLVector(a=2.0,b=ForwardDiff.Dual(1,2))
2-element SLArray{Tuple{2},Real,1,2,(:a, :b)}:
2.0
Dual{Nothing}(1,2)
These should be using promote_type instead of just convert(T:
https://github.com/JuliaDiffEq/LabelledArrays.jl/blob/master/src/slarray.jl#L1-L19
So this is actually an issue in StaticArrays, see https://github.com/JuliaArrays/StaticArrays.jl/pull/670, caused by generated functions.