Skip to content

Commit

Permalink
test fix for tsug_accquote?
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Sep 26, 2024
1 parent 0a22d13 commit 09486b3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/suggest.nim
Original file line number Diff line number Diff line change
Expand Up @@ -487,13 +487,13 @@ proc suggestFieldAccess(c: PContext, n, field: PNode, outputs: var Suggestions)
100, PrefixMatch.None, c.inTypeContext > 0,
-99))

if typ == nil:
if typ == nil or typ.kind == tyNone:
# a module symbol has no type for example:
if n.kind == nkSym and n.sym.kind == skModule:
if n.sym == c.module:
# all symbols accessible, because we are in the current module:
for it in items(c.topLevelScope.symbols):
if filterSym(it, field, pm):
if it.owner == n.sym and filterSym(it, field, pm):
outputs.add(symToSuggest(c.graph, it, isLocal=false, ideSug,
n.info, it.getQuality, pm,
c.inTypeContext > 0, -99))
Expand Down

0 comments on commit 09486b3

Please sign in to comment.