diff options
author | Ryan McConnell <rammcconnell@gmail.com> | 2024-02-20 02:08:16 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 08:08:16 +0100 |
commit | ca77423ffc09e92ca17e430bf79c10ae3c1adb63 (patch) | |
tree | 08ea830c1ff141c8928c0f2fbd01f6fea3f9ac87 /testament | |
parent | 7bf8cd3f8654c152b87052e28c515e525b43b38c (diff) | |
download | Nim-ca77423ffc09e92ca17e430bf79c10ae3c1adb63.tar.gz |
`varargs[typed]` should behave more like `typed` (#23303)
This fixes an oversight with a change that I made a while ago. Basically, these two snippets should both compile. Currently the `varargs` version will fail. ```nim template s(d: typed)=discard proc something()=discard proc something(x:int)=discard s(something) ``` ```nim template s(d: varargs[typed])=discard proc something()=discard proc something(x:int)=discard s(something) ``` Potentially unrelated, but this works currently for some reason: ```nim template s(a: varargs[typed])=discard proc something()=discard proc something(x:int)=discard s: something ``` also, this works: ```nim template s(b:untyped, a: varargs[typed])=discard proc something()=discard proc something(x:int)=discard s (g: int): something ``` but this doesn't, and the error message is not what I would expect: ```nim template s(b:untyped, a: varargs[typed])=discard proc something()=discard proc something(x:int)=discard s (g: int), something ``` So far as I can tell, none of these issues persist for me after the code changes in this PR.
Diffstat (limited to 'testament')
0 files changed, 0 insertions, 0 deletions