Skip to content

Commit 7a59416

Browse files
fix: properly hashcons constant global symbolics
1 parent 65c2e46 commit 7a59416

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/ModelingToolkit.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,6 +359,13 @@ for prop in [SYS_PROPS; [:continuous_events, :discrete_events]]
359359
@eval @public $getter, $hasfn
360360
end
361361

362+
function __init__()
363+
SU.hashcons(unwrap(t_nounits), true)
364+
SU.hashcons(unwrap(t), true)
365+
SU.hashcons(COMMON_NOTHING, true)
366+
SU.hashcons(COMMON_MISSING, true)
367+
end
368+
362369
PrecompileTools.@compile_workload begin
363370
fold1 = Val{false}()
364371
using SymbolicUtils

0 commit comments

Comments
 (0)