Skip to content

Commit

Permalink
generalize to bound symbols to fix twrongopensymchoice
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Oct 17, 2024
1 parent bf40c94 commit 822b24c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions compiler/semcall.nim
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ proc pickBestCandidate(c: PContext, headSymbol: PNode,
if len(syms) == 0:
return
let allowTypeBoundOps = typeBoundOps in c.features and
# qualified symbols cannot refer to other scopes
# (maybe sym and closedsymchoice as well?)
headSymbol.kind != nkDotExpr
# qualified or bound symbols cannot refer to type bound ops
headSymbol.kind in {nkIdent, nkAccQuoted, nkOpenSymChoice, nkOpenSym}
var symMarker = initIntSet()
for s in syms:
symMarker.incl(s.s.id)
Expand Down

0 comments on commit 822b24c

Please sign in to comment.