Skip to content

Commit 187ce45

Browse files
committed
Add comment explaining why calling outer constructor in setproperties
1 parent 84a0596 commit 187ce45

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/types.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ const SIMPLIFIED = 0x01 << 0
9494
function ConstructionBase.setproperties(obj::BasicSymbolic{T}, patch::NamedTuple)::BasicSymbolic{T} where T
9595
nt = getproperties(obj)
9696
nt_new = merge(nt, patch)
97+
# Call outer constructor because hash consing cannot be applied in inner constructor
9798
@compactified obj::BasicSymbolic begin
9899
Sym => Sym{T}(nt_new.name; nt_new...)
99100
_ => Unityper.rt_constructor(obj){T}(;nt_new...)

0 commit comments

Comments
 (0)