Comments (4)
!nim c
type
A = enum t
B = enum t
proc test(_: set[A]) = discard
test { t }
from nim.
this is the offending commit 480e98c
didnt look into this, but it seems like we are trading one error for another?
from nim.
looks like it only worked by chance, because correct enum was the first one, so not really a regression.
from nim.
π§ Linux bisect by @juancarlospaco (collaborator)
devel π FAIL
Output
Error: Command failed: 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
/home/runner/work/Nim/Nim/temp.nim(5, 8) Error: ambiguous identifier: 't' -- use one of the following:
A.t: A
B.t: B
assertions.nim(34) raiseAssert
Error: unhandled exception: errGenerated [AssertionDefect]
IR
Compiled filesize0 bytes (0 bytes)
Stats
- Started
2024-05-06T22:44:36
- Finished
2024-05-06T22:44:36
- Duration
AST
nnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("A"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("t")
)
),
nnkTypeDef.newTree(
newIdentNode("B"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("t")
)
)
),
nnkProcDef.newTree(
newIdentNode("test"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("_"),
nnkBracketExpr.newTree(
newIdentNode("set"),
newIdentNode("A")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkCommand.newTree(
newIdentNode("test"),
nnkCurly.newTree(
newIdentNode("t")
)
)
)
stable π OK
Output
IR
Compiled filesize90.75 Kb (92,928 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef NU8 tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ;
N_LIB_PRIVATE N_NIMCALL(void, test__temp_u11)(tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ __p0);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4621)(void);
static N_INLINE(void, popFrame)(void);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
extern NIM_THREADVAR TFrame* framePtr__system_u4020;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4403;
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4020 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4020).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4020;
framePtr__system_u4020 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4621();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4020 = (*framePtr__system_u4020).prev;
}
N_LIB_PRIVATE N_NIMCALL(void, test__temp_u11)(tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ __p0) {
nimfr_("test", "/home/runner/work/Nim/Nim/temp.nim");
popFrame();
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4403);
return result;
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot4atslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
test__temp_u11(1);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
Stats
- Started
2024-05-06T22:44:37
- Finished
2024-05-06T22:44:37
- Duration
2.0.2 π OK
Output
IR
Compiled filesize90.76 Kb (92,936 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef NU8 tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ;
N_LIB_PRIVATE N_NIMCALL(void, test__temp_u11)(tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ __p0);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4621)(void);
static N_INLINE(void, popFrame)(void);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
extern NIM_THREADVAR TFrame* framePtr__system_u4020;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4403;
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4020 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4020).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4020;
framePtr__system_u4020 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4621();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4020 = (*framePtr__system_u4020).prev;
}
N_LIB_PRIVATE N_NIMCALL(void, test__temp_u11)(tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ __p0) {
nimfr_("test", "/home/runner/work/Nim/Nim/temp.nim");
popFrame();
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4403);
return result;
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
test__temp_u11(1);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
Stats
- Started
2024-05-06T22:44:40
- Finished
2024-05-06T22:44:41
- Duration
1.6.14 π FAIL
Output
Error: Command failed: 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
/home/runner/work/Nim/Nim/temp.nim(3, 12) Error: redefinition of 't'; previous declaration here: /home/runner/work/Nim/Nim/temp.nim(2, 12)
fatal.nim(54) sysFatal
Error: unhandled exception: options.nim(645, 14) `false` errGenerated [AssertionDefect]
IR
Compiled filesize90.76 Kb (92,936 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef NU8 tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ;
N_LIB_PRIVATE N_NIMCALL(void, test__temp_u11)(tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ __p0);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4621)(void);
static N_INLINE(void, popFrame)(void);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
extern NIM_THREADVAR TFrame* framePtr__system_u4020;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4403;
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4020 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4020).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4020;
framePtr__system_u4020 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4621();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4020 = (*framePtr__system_u4020).prev;
}
N_LIB_PRIVATE N_NIMCALL(void, test__temp_u11)(tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ __p0) {
nimfr_("test", "/home/runner/work/Nim/Nim/temp.nim");
popFrame();
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4403);
return result;
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
test__temp_u11(1);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
Stats
- Started
2024-05-06T22:44:43
- Finished
2024-05-06T22:44:43
- Duration
AST
nnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("A"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("t")
)
),
nnkTypeDef.newTree(
newIdentNode("B"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("t")
)
)
),
nnkProcDef.newTree(
newIdentNode("test"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("_"),
nnkBracketExpr.newTree(
newIdentNode("set"),
newIdentNode("A")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkCommand.newTree(
newIdentNode("test"),
nnkCurly.newTree(
newIdentNode("t")
)
)
)
1.4.8 π FAIL
Output
Error: Command failed: 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
/home/runner/work/Nim/Nim/temp.nim(3, 12) Error: redefinition of 't'; previous declaration here: /home/runner/work/Nim/Nim/temp.nim(2, 12)
IR
Compiled filesize90.76 Kb (92,936 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef NU8 tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ;
N_LIB_PRIVATE N_NIMCALL(void, test__temp_u11)(tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ __p0);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4621)(void);
static N_INLINE(void, popFrame)(void);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
extern NIM_THREADVAR TFrame* framePtr__system_u4020;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4403;
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4020 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4020).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4020;
framePtr__system_u4020 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4621();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4020 = (*framePtr__system_u4020).prev;
}
N_LIB_PRIVATE N_NIMCALL(void, test__temp_u11)(tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ __p0) {
nimfr_("test", "/home/runner/work/Nim/Nim/temp.nim");
popFrame();
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4403);
return result;
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
test__temp_u11(1);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
Stats
- Started
2024-05-06T22:44:46
- Finished
2024-05-06T22:44:46
- Duration
AST
nnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("A"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("t")
)
),
nnkTypeDef.newTree(
newIdentNode("B"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("t")
)
)
),
nnkProcDef.newTree(
newIdentNode("test"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("_"),
nnkBracketExpr.newTree(
newIdentNode("set"),
newIdentNode("A")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkCommand.newTree(
newIdentNode("test"),
nnkCurly.newTree(
newIdentNode("t")
)
)
)
1.2.18 π FAIL
Output
Error: Command failed: 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
/home/runner/work/Nim/Nim/temp.nim(3, 12) Error: redefinition of 't'; previous declaration here: /home/runner/work/Nim/Nim/temp.nim(2, 12)
IR
Compiled filesize90.76 Kb (92,936 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef NU8 tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ;
N_LIB_PRIVATE N_NIMCALL(void, test__temp_u11)(tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ __p0);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4621)(void);
static N_INLINE(void, popFrame)(void);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
extern NIM_THREADVAR TFrame* framePtr__system_u4020;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4403;
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4020 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4020).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4020;
framePtr__system_u4020 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4621();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4020 = (*framePtr__system_u4020).prev;
}
N_LIB_PRIVATE N_NIMCALL(void, test__temp_u11)(tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ __p0) {
nimfr_("test", "/home/runner/work/Nim/Nim/temp.nim");
popFrame();
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4403);
return result;
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
test__temp_u11(1);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
Stats
- Started
2024-05-06T22:44:49
- Finished
2024-05-06T22:44:49
- Duration
AST
nnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("A"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("t")
)
),
nnkTypeDef.newTree(
newIdentNode("B"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("t")
)
)
),
nnkProcDef.newTree(
newIdentNode("test"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("_"),
nnkBracketExpr.newTree(
newIdentNode("set"),
newIdentNode("A")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkCommand.newTree(
newIdentNode("test"),
nnkCurly.newTree(
newIdentNode("t")
)
)
)
1.0.10 π FAIL
Output
Error: Command failed: 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
/home/runner/work/Nim/Nim/temp.nim(3, 12) Error: redefinition of 't'; previous declaration here: /home/runner/work/Nim/Nim/temp.nim(2, 12)
IR
Compiled filesize90.76 Kb (92,936 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
#define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename;NI len;VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
#define nimln_(n) \
FR_.line = n;
#define nimlf_(n, file) \
FR_.line = n; FR_.filename = file;
typedef NU8 tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ;
N_LIB_PRIVATE N_NIMCALL(void, test__temp_u11)(tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ __p0);
static N_INLINE(void, nimFrame)(TFrame* s_p0);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_u4621)(void);
static N_INLINE(void, popFrame)(void);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
extern NIM_THREADVAR TFrame* framePtr__system_u4020;
extern NIM_THREADVAR NIM_BOOL nimInErrorMode__system_u4403;
static N_INLINE(void, nimFrame)(TFrame* s_p0) {
{
if (!(framePtr__system_u4020 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s_p0).calldepth = ((NI16)0);
}
goto LA1_;
LA3_: ;
{
(*s_p0).calldepth = (NI16)((*framePtr__system_u4020).calldepth + ((NI16)1));
}
LA1_: ;
(*s_p0).prev = framePtr__system_u4020;
framePtr__system_u4020 = s_p0;
{
if (!((*s_p0).calldepth == ((NI16)2000))) goto LA8_;
callDepthLimitReached__system_u4621();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_u4020 = (*framePtr__system_u4020).prev;
}
N_LIB_PRIVATE N_NIMCALL(void, test__temp_u11)(tySet_tyEnum_A__YuhD9bDEgLsBcyePnkdp6dQ __p0) {
nimfr_("test", "/home/runner/work/Nim/Nim/temp.nim");
popFrame();
}
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) {
NIM_BOOL* result;
result = (&nimInErrorMode__system_u4403);
return result;
}
N_LIB_PRIVATE void PreMainInner(void) {
}
N_LIB_PRIVATE int cmdCount;
N_LIB_PRIVATE char** cmdLine;
N_LIB_PRIVATE char** gEnv;
N_LIB_PRIVATE void PreMain(void) {
#if 0
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus2dot0dot2atslibatssystemdotnim_Init000();
PreMainInner();
#endif
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
#if 0
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
(*inner)();
#else
PreMain();
NimMainInner();
#endif
}
int main(int argc, char** args, char** env) {
cmdLine = args;
cmdCount = argc;
gEnv = env;
NimMain();
return nim_program_result;
}
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
{
NIM_BOOL* nimErr_;
nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
nimErr_ = nimErrorFlag();
test__temp_u11(1);
if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_;
BeforeRet_: ;
nimTestErrorFlag();
popFrame();
}
}
Stats
- Started
2024-05-06T22:44:51
- Finished
2024-05-06T22:44:51
- Duration
AST
nnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("A"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("t")
)
),
nnkTypeDef.newTree(
newIdentNode("B"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("t")
)
)
),
nnkProcDef.newTree(
newIdentNode("test"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("_"),
nnkBracketExpr.newTree(
newIdentNode("set"),
newIdentNode("A")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkDiscardStmt.newTree(
newEmptyNode()
)
)
),
nnkCommand.newTree(
newIdentNode("test"),
nnkCurly.newTree(
newIdentNode("t")
)
)
)
#480e98c47 β‘οΈ π
Diagnostics
metagn introduced a bug at 2023-09-03 14:59:03 +0300
on commit #480e98c47 with message:
resolve unambiguous enum symchoices from local scope, error on rest (#22606)
fixes #22598, properly fixes #21887 and fixes test case issue number
When an enum field sym choice has to choose a type, check if its name is
ambiguous in the local scope, then check if the first symbol found in
the local scope is the first symbol in the sym choice. If so, choose
that symbol. Otherwise, give an ambiguous identifier error.
The dependence on the local scope implies this will always give
ambiguity errors for unpicked enum symchoices from generics and
templates and macros from other scopes. We can change `not
isAmbiguous(...) and foundSym == first` to `not (isAmbiguous(...) and
foundSym == first)` to make it so they never give ambiguity errors, and
always pick the first symbol in the symchoice. I can do this if this is
preferred, but no code from CI seems affected.
The bug is in the files:
compiler/lookups.nim
compiler/semexprs.nim
tests/enum/tambiguousoverloads.nim
tests/enum/toverloadable_enums.nim
tests/lookups/tambsym3.nim
The bug can be in the commits:
(Diagnostics sometimes off-by-one).
Stats
- GCC
11.4.0
- Clang
14.0.0
- NodeJS
20.2
- Created
2024-05-06T22:44:03Z
- Comments
1
- Commands
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
π€ Bug found in 8 minutes
bisecting 589
commits at 73
commits per second
from nim.
Related Issues (20)
- Add `hash()` for `Path`
- [C, C++ & ObjC codegen] Incompatible pointer types used in codegen (an error on GCC 14) HOT 1
- Why this code produces a compiler warningοΌ Warning: `=destroy`(t.c) can raise an unlisted exception: Exception HOT 1
- Consider migrating from pcre to pcre2 HOT 1
- [Feature] a new lint rule to require that each block must end with #. or # or a new line. HOT 2
- Nimsuggest's inlay exception hints don't work for iterators
- compiler does not throw "... has to be used or discarded" error when else branch raises error HOT 6
- Extremely slow and inefficient hash function for openArray[byte] for 64-bit systems HOT 4
- Overloaded `template`s across scopes where one has `untyped` parameter fail to build HOT 2
- Closures capture scope is confusing, leading to unexpective behaviour
- Devel: Illegal storage access in alloc.nim HOT 1
- when nimvm doesn't isolate symbols HOT 3
- when nimvm visible in runtime code causing misexecution due to matching preference rules HOT 2
- [Regression] compiler is not inferring the type of an `enum` marked with the `pure` pragma when there is a type with the same identifier as a value of this enum HOT 7
- SIGSEGV with object variants and RTTI HOT 10
- Bug in C++ codegen for set stringify when setting size HOT 5
- Support `jobserver` when parallelising builds
- On Linux, "nimsuggest" crashes if Nim is installed in /usr/bin and the library in /usr/lib/nim HOT 6
- dom addEventListener has ambiguous types HOT 1
- SigAction isn't missing a field on amd64? HOT 28
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nim.