.n.isNil checks for tyTuple PTypes.

This commit is contained in:
Max Zerzouri 2015-03-07 10:43:47 +13:00
commit 7527da7043
4 changed files with 5 additions and 2 deletions

View file

@ -138,7 +138,7 @@ proc guardDotAccess(a: PEffects; n: PNode) =
if g.kind == skUnknown:
var field: PSym = nil
var ty = n.sons[0].typ.skipTypes(abstractPtrs)
if ty.kind == tyTuple:
if ty.kind == tyTuple and not ty.n.isNil:
field = lookupInRecord(ty.n, g.name)
else:
while ty != nil and ty.kind == tyObject: