Closed
Description
See PainterQubits/Unitful.jl#557:
julia> using Unitful;
julia> [1.0u"m", 2.0u"m"] .+ 3.0u"m"
2-element Vector{Quantity{Float64, 𝐋, Unitful.FreeUnits{(m,), 𝐋, nothing}}}:
4.0 m
5.0 m
julia> Any[1.0u"m", 2.0u"m"] .+ 3.0u"m"
ERROR: + not defined for Quantity{Float64, 𝐋, Unitful.FreeUnits{(m,), 𝐋, nothing}}
[...]
[1.0u"m", 2.0u"m"] .+ 3.0u"m"
uses
+(x::AbstractQuantity{S,D,U}, y::AbstractQuantity{T,D,U}) where {S,T,D,U}
in Unitful at src/quantities.jl:125Any[1.0u"m", 2.0u"m"] .+ 3.0u"m"
uses
+(x::T, y::T) where T<:Number
in Base at promotion.jl:463` and therefore errors.
It worked on 1.8.0 and is broken on 1.8.1 and master. For the regression from 1.8.0 to 1.8.1, bisect blames 5d03fcd, which is the backport of #46535.