Skip to content

Commit

Permalink
premature fix CI
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Sep 17, 2023
1 parent 10ba662 commit fc78fd1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions compiler/semexprs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ proc semSymChoice(c: PContext, n: PNode, flags: TExprFlags = {}, expectedType: P
result = fitNode(c, expectedType, result, n.info)
if result.kind == nkSym:
result = semSym(c, result, result.sym, flags)
if isSymChoice(result) and efAllowSymChoice notin flags:
if isSymChoice(result) and {efAllowSymChoice, efDetermineType} * flags == {}:
# some contexts might want sym choices preserved for later disambiguation
# in general though they are ambiguous
let first = n[0].sym
Expand Down Expand Up @@ -1462,7 +1462,7 @@ proc builtinFieldAccess(c: PContext; n: PNode; flags: var TExprFlags): PNode =
onUse(n[1].info, s)
return

n[0] = semExprWithType(c, n[0], flags+{efDetermineType, efWantIterable})
n[0] = semExprWithType(c, n[0], flags+{efDetermineType, efWantIterable, efAllowSymChoice})
#restoreOldStyleType(n[0])
var i = considerQuotedIdent(c, n[1], n)
var ty = n[0].typ
Expand Down
2 changes: 1 addition & 1 deletion tests/enum/tambiguousoverloads.nim
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ block: # bug #21887
EnumC = enum C

doAssert typeof(EnumC(A)) is EnumC #[tt.Error
^ ambiguous identifier 'A' -- use one of the following:
^ ambiguous identifier 'A' -- use one of the following:
EnumA.A: EnumA
EnumB.A: EnumB]#

Expand Down
2 changes: 1 addition & 1 deletion tests/lookups/tambprocvar.nim
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ block:

block:
let x = `+` #[tt.Error
^ ambiguous identifier '+' -- use one of the following:]#
^ ambiguous identifier '+' -- use one of the following:]#

0 comments on commit fc78fd1

Please sign in to comment.