This commit is contained in:
Araq 2014-12-31 16:07:56 +01:00
commit 2ee2401336
5 changed files with 10 additions and 7 deletions

View file

@ -985,7 +985,7 @@ proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode =
of tyTypeParamsHolders:
return readTypeParameter(c, ty, i, n.info)
of tyObject, tyTuple:
if ty.n.kind == nkRecList:
if ty.n != nil and ty.n.kind == nkRecList:
for field in ty.n:
if field.sym.name == i:
n.typ = newTypeWithSons(c, tyFieldAccessor, @[ty, field.sym.typ])