Skip to content

Commit

Permalink
Call outer constructor for Sym in ConstructionBase.setproperties
Browse files Browse the repository at this point in the history
  • Loading branch information
bowenszhu committed Nov 5, 2024
1 parent 2779856 commit d36198f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,10 @@ const SIMPLIFIED = 0x01 << 0
function ConstructionBase.setproperties(obj::BasicSymbolic{T}, patch::NamedTuple)::BasicSymbolic{T} where T
nt = getproperties(obj)
nt_new = merge(nt, patch)
Unityper.rt_constructor(obj){T}(;nt_new...)
@compactified obj::BasicSymbolic begin
Sym => Sym{T}(nt_new.name; nt_new...)
_ => Unityper.rt_constructor(obj){T}(;nt_new...)
end
end

###
Expand Down

0 comments on commit d36198f

Please sign in to comment.