Closed mjfh closed 8 months ago
!nim c
# This is a sample code, the first echo statement prints out the error
type
A = object
case w: uint8
of 1:
n: int
else:
other: string
const
a = A(w: 1, n: 5)
proc foo =
let c = [a]
doAssert c[0].n == 5
foo()
98.56 Kb (100,928 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2024-02-09T08:56:48
2024-02-09T08:56:50
1 minutes
96.48 Kb (98,800 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2024-02-09T08:56:51
2024-02-09T08:56:52
96.48 Kb (98,800 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2024-02-09T08:56:55
2024-02-09T08:56:55
104.73 Kb (107,248 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2024-02-09T08:56:58
2024-02-09T08:56:58
92.17 Kb (94,384 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2024-02-09T08:57:00
2024-02-09T08:57:01
91.90 Kb (94,104 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2024-02-09T08:57:03
2024-02-09T08:57:03
86.95 Kb (89,040 bytes)
```cpp
#define NIM_INTBITS 64
#include "nimbase.h"
#include 2024-02-09T08:57:05
2024-02-09T08:57:06
11.4.0
14.0.0
19.0
2024-02-09T08:56:19Z
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 20 minutes
bisecting 7
commits at 0
commits per second
Description
Nim Version
Nim Compiler Version 1.6.18 [Linux: amd64] Compiled at 2024-02-05 Copyright (c) 2006-2023 by Andreas Rumpf
Current Output
Expected Output
Possible Solution
no idea, the workaround is using
let
instead ofconst
Additional Information
Nim compiler is compiled as part of
nimbus-eth1