Skip to content

Commit

Permalink
rebase, add test for #15650, will try removing finishOperand after
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Jan 6, 2024
1 parent 81026af commit 3bd469f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler/semexprs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,9 @@ proc resolveSymChoice(c: PContext, n: var PNode, flags: TExprFlags = {}, expecte
if isSymChoice(n) and efAllowSymChoice notin flags:
# some contexts might want sym choices preserved for later disambiguation
# in general though they are ambiguous
let first = n[0].sym
let first = n[0]
if nfPreferredSym in first.flags:
n = n[0]
n = first

proc semSymChoice(c: PContext, n: PNode, flags: TExprFlags = {}, expectedType: PType = nil): PNode =
result = n
Expand Down
13 changes: 13 additions & 0 deletions tests/template/tbaddeprecated.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# issue #15650

{.warningAsError[Deprecated]: on.}

proc bar() {.deprecated.} = discard

template foo() =
when false:
bar()
else:
discard

foo()

0 comments on commit 3bd469f

Please sign in to comment.