-
-
Couldn't load subscription status.
- Fork 5.7k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorpriorityThis should be addressed urgentlyThis should be addressed urgentlyregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version
Description
See JuliaPhysics/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<:Numberin 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.
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorpriorityThis should be addressed urgentlyThis should be addressed urgentlyregressionRegression in behavior compared to a previous versionRegression in behavior compared to a previous version