overloading of '=' works

This commit is contained in:
Araq 2015-04-06 23:20:41 +02:00
commit 05e39cf6ad
9 changed files with 147 additions and 6 deletions

View file

@ -0,0 +1,10 @@
type
Concrete* = object
a*, b*: string
rc*: int # refcount
proc `=`(d: var Concrete; src: Concrete) =
shallowCopy(d.a, src.a)
shallowCopy(d.b, src.b)
dec d.rc
d.rc = src.rc + 1