Skip to content

Commit

Permalink
_
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Mar 22, 2020
1 parent 8c5722f commit 6a9f238
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions compiler/semexprs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1279,16 +1279,11 @@ proc builtinFieldAccess(c: PContext, n: PNode, flags: TExprFlags): PNode =

var flags2 = {checkAmbiguity, checkUndeclared, checkModule}
var s = qualifiedLookUp(c, n, flags2)

if nfOverloadResolve in n.flags and n.kind == nkDotExpr:
var m = qualifiedLookUp(c, n[0], (flags2*{checkUndeclared})+{checkModule})
if m != nil and m.kind == skModule:
# it's mymodule.someident
if s == nil:
return nil
else:
return symChoice(c, n, s, scClosed)

if m != nil and m.kind == skModule: # got `mymodule.someident`
if s == nil: return nil
else: return symChoice(c, n, s, scClosed)
if s != nil:
if s.kind in OverloadableSyms:
result = symChoice(c, n, s, scClosed)
Expand Down

0 comments on commit 6a9f238

Please sign in to comment.