Skip to content

Commit d988f1c

Browse files
fix: fix promote_operation_fallback for AddSubMul with UniformScaling
1 parent 0267f18 commit d988f1c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/interface.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,23 @@ function promote_operation_fallback(
5757
return promote_operation(new_op, T, z)
5858
end
5959

60+
function promote_operation_fallback(
61+
op::AddSubMul,
62+
::Type{S},
63+
::Type{LinearAlgebra.UniformScaling{T}},
64+
) where {S, T}
65+
promote_operation(op, S, T)
66+
end
67+
68+
# avoids ambiguity of the method above this with the one below it
69+
function promote_operation_fallback(
70+
op::AddSubMul,
71+
::Type{S},
72+
::Type{LinearAlgebra.UniformScaling{T}},
73+
) where {S <: AbstractArray, T}
74+
promote_operation(op, S, Matrix{T})
75+
end
76+
6077
function promote_operation_fallback(
6178
op::AddSubMul,
6279
x::Type{<:AbstractArray},

0 commit comments

Comments
 (0)