Skip to content

Commit 4ff2760

Browse files
fix: fix promote_operation for Integer / Integer
1 parent 6a73b46 commit 4ff2760

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/interface.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ function promote_operation_fallback(
4747
end
4848
end
4949

50+
function promote_operation_fallback(
51+
op::typeof(/),
52+
::Type{S},
53+
::Type{T},
54+
) where {S<:Integer,T<:Integer}
55+
if isconcretetype(S) && isconcretetype(T)
56+
return typeof(op(_instantiate_zero(S), _instantiate_oneunit(T)))
57+
else
58+
return promote_type(float(S), float(T))
59+
end
60+
end
61+
5062
function promote_operation_fallback(
5163
op::F,
5264
::Type{S},

0 commit comments

Comments
 (0)