diff options
author | Zahary Karadjov <zahary@gmail.com> | 2017-06-19 22:45:15 +0300 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-06-20 11:29:42 +0200 |
commit | 21ce7b2af4163b2513f3c6cbf2f52929d684bcb3 (patch) | |
tree | 28a5548f01a988dc09dcaf2af93313495d27b723 /compiler/semexprs.nim | |
parent | a6006e56a7eef8e4d678c8369cee6ba66094dd67 (diff) | |
download | Nim-21ce7b2af4163b2513f3c6cbf2f52929d684bcb3.tar.gz |
Fix #5888
Diffstat (limited to 'compiler/semexprs.nim')
-rw-r--r-- | compiler/semexprs.nim | 2 |
1 files changed, 1 insertions, 1 deletions
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: |