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

` Warning: fun is deprecated` doesn't check whether deprecated overload is actually used #9759

timotheecour opened this issue Nov 20, 2018 · 1 comment


None yet
2 participants
Copy link

commented Nov 20, 2018

code below give ` Warning: fun is deprecated` but shouldn't, since we're using
the non-deprecated overload

proc fun(a: string) {.deprecated.} = echo "ok1"
proc fun(a: int) = echo "ok2"

proc bar(fun: proc(a:int):void)=

# Warning: fun is deprecated

This comment has been minimized.

Copy link

commented Nov 22, 2018

Well I found where the bug is introduced:

var s = qualifiedLookUp(c, n, checks)

qualifiedLookup returns a symbol of the first symbol with that name "fun".

result = semSym(c, n, s, flags)

This symbol then gets a sem check, where the deprecartion warning is created. Only afterwards the symbol is actually transformed into a sym choice:
result = symChoice(c, n, s, scClosed)

I don't know what to do about it.

krux02 added a commit to krux02/Nim that referenced this issue Nov 23, 2018

@Araq Araq closed this in 56c4a4a Nov 23, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.