-
-
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
varargs[typed]
Doesn't accept nnkClosedSymChoice
node but typed
does
#19446
Comments
Related and/or duplicate of #13913 ? |
It is, but the issue there isn't the multiple procs, it's that one of them is overloaded. Any idea where to look to fix this? |
Where you need to look is Line 960 in 7bdfeb7
|
So it seems that this is the issue Lines 2208 to 2211 in 7bdfeb7
When it isn't overloaded symbol, then it delegates to If, however, the symbol is overloaded, it tries every one of the symbols, but doesn't try Not sure if this is the intended behaviour or what the proper way to fix it if it isn't the intended behaviour. I could technically just add and else statement here Lines 2236 to 2250 in 7bdfeb7
with something like elif f.kind == tyVarargs and f.n == nil and userConvMatch(c, m, f, a, arg) == nil: then something like this Line 2097 in 7bdfeb7
I don't know the possibles cases of the compiler well enough to make an informed change Any guidance (or help) would be much appreciated |
I guess my questions are:
|
When using the The rest I do not know. |
Makes sense Although there there is this Line 2513 in 7bdfeb7
|
More questions:
|
Perhaps you should ask these questions inside the internals realtime chat |
There was a bug that params wouldn't be matched if the param was overloaded and the candidate type was varargs. This checks the base type of the `varargs` and then will to an overloaded symbol if in a macros or template. Closes nim-lang#19446 & nim-lang#13913
This isn't an issue with import sequtils
echo @[1, 3, 4, 5].map(len) |
Not sure how to proceed with this one. Would resolving as a |
Never mind, it seems like |
There was a bug that params wouldn't be matched if the param was overloaded and the candidate type was varargs. This checks the base type of the `varargs` and then will to an overloaded symbol if in a macros or template. Fixes nim-lang#19446 Fixes nim-lang#13913
There was a bug that params wouldn't be matched if the param was overloaded and the candidate type was varargs. This checks the base type of the `varargs` and then will to an overloaded symbol if in a macros or template. Fixes nim-lang#19446 & nim-lang#13913
There was a bug that params wouldn't be matched if the param was overloaded and the candidate type was varargs. This checks the base type of the `varargs` and then will to an overloaded symbol if in a macros or template. Fixes nim-lang#19446 & nim-lang#13913
There was a bug that params wouldn't be matched if the param was overloaded and the candidate type was varargs. This checks the base type of the `varargs` and then will to an overloaded symbol if in a macros or template. Fixes nim-lang#19446 & nim-lang#13913
There was a bug that params wouldn't be matched if the param was overloaded and the candidate type was varargs. This checks the base type of the `varargs` and then will to an overloaded symbol if in a macros or template. Fixes nim-lang#19446 & nim-lang#13913
There was a bug that params wouldn't be matched if the param was overloaded and the candidate type was varargs. This checks the base type of the `varargs` and then will to an overloaded symbol if in a macros or template. Fixes nim-lang#19446 & nim-lang#13913
Works now maybe because of opt-in symchoices? |
closes nim-lang#6013, closes nim-lang#7009, closes nim-lang#9190, closes nim-lang#12487, closes nim-lang#12831, closes nim-lang#13184, closes nim-lang#13252, closes nim-lang#14860, closes nim-lang#14877, closes nim-lang#14894, closes nim-lang#14917, closes nim-lang#16153, closes nim-lang#16439, closes nim-lang#17779, closes nim-lang#18074, closes nim-lang#18202, closes nim-lang#18314, closes nim-lang#18648, closes nim-lang#19063, closes nim-lang#19446, closes nim-lang#20065, closes nim-lang#20367, closes nim-lang#22126, closes nim-lang#22820, closes nim-lang#22888, closes nim-lang#23020, closes nim-lang#23287, closes nim-lang#23510
varargs[typed]
as macro parameter type doesn't accept aNimNode
of kindnnkClosedSymChoice
but just a parameter type oftyped
does.Example
Current Output
Expected Output
Additional Information
Seems to exist at least back from 1.0.0
Testing on nightly
The text was updated successfully, but these errors were encountered: