Skip to content

Commit f5f8ffe

Browse files
committed
Always attach metadata in similarterm
1 parent 335c7ba commit f5f8ffe

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/systems/abstractsystem.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -817,12 +817,14 @@ function renamespace(sys, x)
817817
T = typeof(x)
818818
if istree(x) && operation(x) isa Operator
819819
return similarterm(x, operation(x),
820-
Any[renamespace(sys, only(arguments(x)))])::T
820+
Any[renamespace(sys, only(arguments(x)))];
821+
metadata = metadata(x))::T
821822
end
822823
if istree(x) && operation(x) === getindex
823824
args = arguments(x)
824825
return similarterm(
825-
x, operation(x), vcat(renamespace(sys, args[1]), args[2:end]))::T
826+
x, operation(x), vcat(renamespace(sys, args[1]), args[2:end]);
827+
metadata = metadata(x))::T
826828
end
827829
let scope = getmetadata(x, SymScope, LocalScope())
828830
if scope isa LocalScope

0 commit comments

Comments
 (0)