added broken tbintree test

This commit is contained in:
Andreas Rumpf 2017-10-19 21:03:20 +02:00
commit 1a0032eb68
2 changed files with 100 additions and 4 deletions

View file

@ -287,16 +287,15 @@ proc liftBody(c: PContext; typ: PType; kind: TTypeAttachedOp;
if kind != attachedDestructor:
result.typ.addParam src
# recursion is handled explicitly, but register the type based operation
# here in order to keep things robust against runaway recursions:
liftBodyAux(a, typ, body, newSymNode(dest).newDeref, newSymNode(src))
# recursion is handled explicitly, do not register the type based operation
# before 'liftBodyAux':
case kind
of attachedAsgn: typ.assignment = result
of attachedSink: typ.sink = result
of attachedDeepCopy: typ.deepCopy = result
of attachedDestructor: typ.destructor = result
liftBodyAux(a, typ, body, newSymNode(dest).newDeref, newSymNode(src))
var n = newNodeI(nkProcDef, info, bodyPos+1)
for i in 0 .. < n.len: n.sons[i] = emptyNode
n.sons[namePos] = newSymNode(result)