Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{.deprecated.} false positive within template/generics #15650

Open
alaviss opened this issue Oct 20, 2020 · 0 comments · May be fixed by #23104
Open

{.deprecated.} false positive within template/generics #15650

alaviss opened this issue Oct 20, 2020 · 0 comments · May be fixed by #23104

Comments

@alaviss
Copy link
Collaborator

alaviss commented Oct 20, 2020

Example

proc bar() {.deprecated.} = discard

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

foo()

Current Output

test.nim(5, 5) Warning: bar is deprecated [Deprecated]

Expected Output

No warnings should be shown.

Additional Information

  • The same bug manifests if foo is a generic proc
Nim Compiler Version 1.5.1 [Linux: amd64]
Compiled at 2020-10-19
Copyright (c) 2006-2020 by Andreas Rumpf

git hash: f20e485827df6df97b8396558b10d7c59ca1b7dc
active boot switches: -d:release -d:nimUseLinenoise -d:nativeStackTrace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants