code cleanup: there is no tyOptRef

This commit is contained in:
Andreas Rumpf 2019-02-22 19:42:11 +01:00
commit 721bf7188b
14 changed files with 36 additions and 47 deletions

View file

@ -124,7 +124,7 @@ proc genericDeepCopyAux(dest, src: pointer, mt: PNimType; tab: var PtrTable) =
for i in 0..(mt.size div mt.base.size)-1:
genericDeepCopyAux(cast[pointer](d +% i *% mt.base.size),
cast[pointer](s +% i *% mt.base.size), mt.base, tab)
of tyRef, tyOptAsRef:
of tyRef:
let s2 = cast[PPointer](src)[]
if s2 == nil:
unsureAsgnRef(cast[PPointer](dest), s2)