@@ -1498,6 +1498,28 @@ end
1498
1498
n = Int64 (1024 / log2 (E))
1499
1499
@test E^ n == Inf
1500
1500
@test E^ float (n) == Inf
1501
+
1502
+ # #55633
1503
+ struct Issue55633_1 <: Number end
1504
+ struct Issue55633_3 <: Number end
1505
+ struct Issue55633_9 <: Number end
1506
+ Base. one (:: Issue55633_3 ) = Issue55633_1 ()
1507
+ Base.:(* )(:: Issue55633_3 , :: Issue55633_3 ) = Issue55633_9 ()
1508
+ Base. promote_rule (:: Type{Issue55633_1} , :: Type{Issue55633_3} ) = Int
1509
+ Base. promote_rule (:: Type{Issue55633_3} , :: Type{Issue55633_9} ) = Int
1510
+ Base. promote_rule (:: Type{Issue55633_1} , :: Type{Issue55633_9} ) = Int
1511
+ Base. promote_rule (:: Type{Issue55633_1} , :: Type{Int} ) = Int
1512
+ Base. promote_rule (:: Type{Issue55633_3} , :: Type{Int} ) = Int
1513
+ Base. promote_rule (:: Type{Issue55633_9} , :: Type{Int} ) = Int
1514
+ Base. convert (:: Type{Int} , :: Issue55633_1 ) = 1
1515
+ Base. convert (:: Type{Int} , :: Issue55633_3 ) = 3
1516
+ Base. convert (:: Type{Int} , :: Issue55633_9 ) = 9
1517
+ for x ∈ (im, pi , Issue55633_3 ())
1518
+ p = promote (one (x), x, x* x)
1519
+ for y ∈ 0 : 2
1520
+ @test all ((t -> === (t... )), zip (x^ y, p[y + 1 ]))
1521
+ end
1522
+ end
1501
1523
end
1502
1524
1503
1525
# Test that sqrt behaves correctly and doesn't exhibit fp80 double rounding.
0 commit comments