Files
Nim/compiler
Ryan McConnell ca77423ffc 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.
2024-02-20 08:08:16 +01:00
..
2023-12-13 10:29:58 +01:00
2023-12-15 10:20:57 +01:00
2023-12-13 10:29:58 +01:00
2023-12-17 18:43:52 +01:00
2023-12-25 07:12:54 +01:00
2022-09-27 10:57:47 +02:00
2023-12-15 10:20:57 +01:00
2023-12-15 10:20:57 +01:00
2023-12-15 10:20:57 +01:00
2017-01-07 22:35:09 +01:00
2023-12-15 10:20:57 +01:00
2023-12-17 18:43:52 +01:00
2023-12-15 10:20:57 +01:00
2023-12-13 10:29:58 +01:00
2023-11-04 17:46:59 +08:00
2021-01-12 09:36:51 +01:00
2022-03-23 20:34:53 +01:00
2023-12-17 18:43:52 +01:00
2023-07-02 22:36:05 +02:00
2023-11-06 18:33:28 +01:00
2023-12-17 18:43:52 +01:00
2023-12-15 10:20:57 +01:00
2023-12-13 10:29:58 +01:00
2023-12-15 10:20:57 +01:00
2023-12-15 10:20:57 +01:00
2023-12-17 18:43:52 +01:00
2023-12-25 07:12:54 +01:00

Nim Compiler

  • This directory contains the Nim compiler written in Nim.
  • Note that this code has been translated from a bootstrapping version written in Pascal.
  • So the code is not a poster child of good Nim code.

See Internals of the Nim Compiler for more information.