Skip to content

Commit c918020

Browse files
committed
fix scaledoperator constructor to play nice with setbang
1 parent fea08fd commit c918020

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/basic.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -249,9 +249,11 @@ struct ScaledOperator{T,
249249
L::LType
250250
cache::T
251251

252-
function ScaledOperator::ScalarOperator, L::AbstractSciMLOperator)
253-
T = promote_type(eltype.((λ, L))...)
254-
cache = zero(T)
252+
function ScaledOperator::ScalarOperator{Tλ},
253+
L::AbstractSciMLOperator{TL},
254+
cache = zero(promote_type(Tλ,TL))
255+
) where{Tλ,TL}
256+
T = promote_type(Tλ, TL)
255257
new{T,typeof(λ),typeof(L)}(λ, L, cache)
256258
end
257259
end

0 commit comments

Comments
 (0)