deepcopy_internal override to protect ParentObject from duplication

This commit is contained in:
kalmar 2017-05-11 18:03:06 +02:00
parent a3db7ab92c
commit f9ccff01a8
1 changed files with 5 additions and 0 deletions

View File

@ -60,7 +60,12 @@ function hash(W::GWord, h::UInt)
W.modified && reduce!(W)
return W.savedhash $ h
end
function deepcopy_internal{T<:GSymbol}(W::GWord{T}, dict::ObjectIdDict)
G = parent(W)
return G(GWord{T}(deepcopy(W.symbols)))
end
length(W::GWord) = sum([length(s) for s in W.symbols])
function free_reduce!(W::GWord)