From 3011f8975dd458d01a3f7885ec26f195ddebc983 Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Fri, 3 May 2024 12:00:33 +0530 Subject: [PATCH] fix: fix array symbolics indexing with symbolic elsymtype --- src/parameter_indexing.jl | 4 ++-- src/state_indexing.jl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/parameter_indexing.jl b/src/parameter_indexing.jl index d8b3122..79336a3 100644 --- a/src/parameter_indexing.jl +++ b/src/parameter_indexing.jl @@ -140,7 +140,7 @@ for (t1, t2) in [ end end -function _getp(sys, ::ArraySymbolic, ::NotSymbolic, p) +function _getp(sys, ::ArraySymbolic, ::SymbolicTypeTrait, p) if is_parameter(sys, p) idx = parameter_index(sys, p) return invoke(_getp, Tuple{Any, NotSymbolic, NotSymbolic, Any}, @@ -218,7 +218,7 @@ for (t1, t2) in [ end end -function _setp(sys, ::ArraySymbolic, ::NotSymbolic, p) +function _setp(sys, ::ArraySymbolic, ::SymbolicTypeTrait, p) if is_parameter(sys, p) idx = parameter_index(sys, p) return setp(sys, idx; run_hook = false) diff --git a/src/state_indexing.jl b/src/state_indexing.jl index 272c841..cd16b10 100644 --- a/src/state_indexing.jl +++ b/src/state_indexing.jl @@ -169,7 +169,7 @@ for (t1, t2) in [ end end -function _getu(sys, ::ArraySymbolic, ::NotSymbolic, sym) +function _getu(sys, ::ArraySymbolic, ::SymbolicTypeTrait, sym) if is_variable(sys, sym) idx = variable_index(sys, sym) return getu(sys, idx) @@ -233,7 +233,7 @@ for (t1, t2) in [ end end -function _setu(sys, ::ArraySymbolic, ::NotSymbolic, sym) +function _setu(sys, ::ArraySymbolic, ::SymbolicTypeTrait, sym) if is_variable(sys, sym) idx = variable_index(sys, sym) if idx isa AbstractArray