destructors: preparations for upcoming changes
This commit is contained in:
parent
7ee825a6e5
commit
45d74f4081
8 changed files with 27 additions and 8 deletions
|
|
@ -363,11 +363,7 @@ proc handleGenericInvocation(cl: var TReplTypeVars, t: PType): PType =
|
|||
# '=' needs to be instantiated for generics when the type is constructed:
|
||||
newbody.field = cl.c.instTypeBoundOp(cl.c, opr, result, cl.info,
|
||||
attachedAsgn, 1)
|
||||
# we need to produce the destructor first here because generated '='
|
||||
# and '=sink' operators can rely on it:
|
||||
if newDestructors: typeBound(destructor)
|
||||
typeBound(assignment)
|
||||
typeBound(sink)
|
||||
if not newDestructors: typeBound(assignment)
|
||||
let methods = skipTypes(bbody, abstractPtrs).methods
|
||||
for col, meth in items(methods):
|
||||
# we instantiate the known methods belonging to that type, this causes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue