-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
import os + use of paramCount and paramStr in config.nims causes "ambiguous call' error #12835
Comments
We have to do the same thing in nimble as well today. https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/nimscriptwrapper.nim#L118 |
Not a bug? Even outside of nimscript, name clashes are possible and you need to use qualified names. |
Is this a slightly different case though? The name clashes are understood when the they happen among two or more user-imported modules. In this case, it happens between the implicitly imported system and user imported os. I believe there was already an internal way in the packages to determine if an stdlib module is imported in a NimScript. If so, something special can probably done to prevent this name clash on doing |
|
Please send similar PR for any more such issue :) |
@nc-x Thank you for working on a PR to fix this! I would have liked to send a PR to fix this myself, but looking at your PR, I don't think I would have been able to make those fixes myself. But I am always trying .. |
@kaushalmodi the original PR was much simpler. It just removed the proc declarations from os.nim for nimscript. And it passed all the tests, unlike now :) |
In
config.nims
, when theos
module is imported andparamCount
and/orparamStr
are used, we get the "ambiguous call" error (because these two are defined in bothsystem
andos
.Example
config.nims
Current Output
Expected Output
No error
Workaround
import os except paramCount, paramStr
, orsystem.
qualifiers with the ambiguous identifiers.Additional Information
This used to work at some point (probably around Nim 19.x).
The text was updated successfully, but these errors were encountered: