Skip to content

Commit 61928ab

Browse files
fix: wrap toexpr(::AbstractSystem) in let block
- this avoids errors where the `t` created by `@parameters` in the generated code conflicts with the globally imported one from MTK
1 parent 2c569c8 commit 61928ab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/systems/abstractsystem.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,7 @@ function toexpr(sys::AbstractSystem)
921921
name = $name, checks = false)))
922922
end
923923

924+
expr = :(let; $expr; end)
924925
Base.remove_linenums!(expr) # keeping the line numbers is never helpful
925926
end
926927

0 commit comments

Comments
 (0)