From 21ce7b2af4163b2513f3c6cbf2f52929d684bcb3 Mon Sep 17 00:00:00 2001 From: Zahary Karadjov Date: Mon, 19 Jun 2017 22:45:15 +0300 Subject: Fix #5888 --- compiler/semexprs.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/semexprs.nim') diff --git a/compiler/semexprs.nim b/compiler/semexprs.nim index 7c4fcd881..8169e359a 100644 --- a/compiler/semexprs.nim +++ b/compiler/semexprs.nim @@ -1129,9 +1129,9 @@ proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode = # reset to prevent 'nil' bug: see "tests/reject/tenumitems.nim": ty = n.sons[0].typ return nil - ty = skipTypes(ty, {tyGenericInst, tyVar, tyPtr, tyRef, tyAlias}) if ty.kind in tyUserTypeClasses and ty.isResolvedUserTypeClass: ty = ty.lastSon + ty = skipTypes(ty, {tyGenericInst, tyVar, tyPtr, tyRef, tyAlias}) while tfBorrowDot in ty.flags: ty = ty.skipTypes({tyDistinct}) var check: PNode = nil if ty.kind == tyObject: -- cgit 1.4.1-2-gfad0