diff options
Diffstat (limited to 'compiler/suggest.nim')
-rw-r--r-- | compiler/suggest.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/suggest.nim b/compiler/suggest.nim index 829335015..41d39ccab 100644 --- a/compiler/suggest.nim +++ b/compiler/suggest.nim @@ -265,8 +265,8 @@ proc fieldVisible*(c: PContext, f: PSym): bool {.inline.} = if fmoduleId == module.id: return true if f.kind == skField: var symObj = f.owner - if symObj.typ.kind in {tyRef, tyPtr}: - symObj = symObj.typ[0].sym + if symObj.typ.skipTypes({tyGenericBody, tyGenericInst, tyGenericInvocation, tyAlias}).kind in {tyRef, tyPtr}: + symObj = symObj.typ.toObjectFromRefPtrGeneric.sym for scope in allScopes(c.currentScope): for sym in scope.allowPrivateAccess: if symObj.id == sym.id: return true |