This commit is contained in:
Araq 2014-12-14 11:49:32 +01:00
commit bebac34f87
4 changed files with 39 additions and 12 deletions

View file

@ -147,7 +147,11 @@ proc semForFields(c: PContext, n: PNode, m: TMagic): PNode =
var fc: TFieldsCtx
fc.m = m
fc.c = c
semForObjectFields(fc, tupleTypeA.n, n, stmts)
var t = tupleTypeA
while t.kind == tyObject:
semForObjectFields(fc, t.n, n, stmts)
if t.sons[0] == nil: break
t = skipTypes(t.sons[0], abstractPtrs)
dec(c.p.nestedLoopCounter)
# for TR macros this 'while true: ...; break' loop is pretty bad, so
# we avoid it now if we can: