Open demotomohiro opened 2 months ago
!nim c
template foo(x: int; y = x) =
echo x, y
foo(1)
0 bytes (0 bytes)
```cpp
```
2024-04-16T15:07:35
2024-04-16T15:07:35
0 bytes (0 bytes)
```cpp
```
2024-04-16T15:07:36
2024-04-16T15:07:36
0 bytes (0 bytes)
```cpp
```
2024-04-16T15:07:39
2024-04-16T15:07:39
0 bytes (0 bytes)
```cpp
```
2024-04-16T15:07:42
2024-04-16T15:07:42
0 bytes (0 bytes)
```cpp
```
2024-04-16T15:07:45
2024-04-16T15:07:45
0 bytes (0 bytes)
```cpp
```
2024-04-16T15:07:47
2024-04-16T15:07:47
0 bytes (0 bytes)
```cpp
```
2024-04-16T15:07:50
2024-04-16T15:07:50
11.4.0
14.0.0
20.2
2024-04-16T15:07:04Z
1
nim c --run -d:nimDebug -d:nimDebugDlOpen -d:ssl -d:nimDisableCertificateValidation --forceBuild:on --colors:off --verbosity:0 --hints:off --lineTrace:off --nimcache:/home/runner/work/Nim/Nim --out:/home/runner/work/Nim/Nim/temp /home/runner/work/Nim/Nim/temp.nim
:robot: Bug found in 19 minutes
bisecting 7
commits at 0
commits per second
Description
Defining a template with a parameter with a default value that is another parameter cause internal error. Example code:
Nim Version
Nim Compiler Version 2.1.1 [Linux: amd64] Compiled at 2024-04-16 Copyright (c) 2006-2024 by Andreas Rumpf
git hash: 549ef24f35213302ba66e9e786c18ab9146940ee active boot switches: -d:release
Current Output
Expected Output
Possible Solution
No response
Additional Information
No response