We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
distribute_shift
1 parent 44f71a8 commit 9b69e0dCopy full SHA for 9b69e0d
src/structural_transformation/utils.jl
@@ -596,7 +596,7 @@ function _distribute_shift(expr, shift)
596
(op isa Pre || op isa Initial) && return expr
597
args = arguments(expr)
598
599
- if ModelingToolkit.isvariable(expr)
+ if ModelingToolkit.isvariable(expr) && operation(expr) !== getindex
600
(length(args) == 1 && isequal(shift.t, only(args))) ? (return shift(expr)) :
601
(return expr)
602
elseif op isa Shift
0 commit comments