@@ -2027,6 +2027,9 @@ g4731() = f4731()
2027
2027
Base. promote_rule (:: Type{Issue13193_Interval{T}} , :: Type{Issue13193_Interval{S}} ) where {T, S} = Issue13193_Interval{promote_type (T,S)}
2028
2028
Base. promote_rule (:: Type{Issue13193_Interval{T}} , :: Type{S} ) where {T, S<: Number } = Issue13193_Interval{promote_type (T,S)}
2029
2029
@test_throws ArgumentError promote_type (Issue13193_Interval{Int}, Issue13193_SIQuantity{Int})
2030
+ @test_throws ArgumentError promote_type (Issue13193_SIQuantity{Int}, Issue13193_Interval{Int})
2031
+ @test Base. Compiler. is_foldable (Base. infer_effects (promote_type, Tuple{Type{Issue13193_Interval{Int}}, Type{Issue13193_SIQuantity{Int}}}))
2032
+ @test Base. Compiler. is_foldable (Base. infer_effects (promote_type, Tuple{Type{Issue13193_SIQuantity{Int}}, Type{Issue13193_Interval{Int}}}))
2030
2033
end
2031
2034
@testset " straightforward conflict in `promote_rule` definitions" begin
2032
2035
struct ConflictingPromoteRuleDefinitionsA end
@@ -2035,6 +2038,8 @@ end
2035
2038
Base. promote_rule (:: Type{ConflictingPromoteRuleDefinitionsB} , :: Type{ConflictingPromoteRuleDefinitionsA} ) = ConflictingPromoteRuleDefinitionsB
2036
2039
@test_throws ArgumentError promote_type (ConflictingPromoteRuleDefinitionsA, ConflictingPromoteRuleDefinitionsB)
2037
2040
@test_throws ArgumentError promote_type (ConflictingPromoteRuleDefinitionsB, ConflictingPromoteRuleDefinitionsA)
2041
+ @test Base. Compiler. is_foldable (Base. infer_effects (promote_type, Tuple{Type{ConflictingPromoteRuleDefinitionsA}, Type{ConflictingPromoteRuleDefinitionsB}}))
2042
+ @test Base. Compiler. is_foldable (Base. infer_effects (promote_type, Tuple{Type{ConflictingPromoteRuleDefinitionsB}, Type{ConflictingPromoteRuleDefinitionsA}}))
2038
2043
end
2039
2044
2040
2045
# issue #4675
0 commit comments