Comments (4)
!nim c
import std/heapqueue
type Algo = enum heapqueue, quick
proc bar*(algo=quick) =
var x: HeapQueue[int]
case algo
of heapqueue: echo 1
of quick: echo 2
echo x.len
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(6, 6) Error: expression 'heapqueue' has no type (or is ambiguous)
assertions.nim(34) raiseAssert
Error: unhandled exception: errGenerated [AssertionDefect]
IR
Compiled filesize0 bytes (0 bytes)
Stats
- Started
2024-05-11T13:52:10
- Finished
2024-05-11T13:52:11
- Duration
AST
nnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("heapqueue")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Algo"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("heapqueue"),
newIdentNode("quick")
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("bar")
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("algo"),
newEmptyNode(),
newIdentNode("quick")
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("HeapQueue"),
newIdentNode("int")
),
newEmptyNode()
)
),
nnkCaseStmt.newTree(
newIdentNode("algo"),
nnkOfBranch.newTree(
newIdentNode("heapqueue"),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
newLit(1)
)
)
),
nnkOfBranch.newTree(
newIdentNode("quick"),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
newLit(2)
)
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("len")
)
)
)
)
)
stable 👍 OK
Output
IR
Compiled filesize90.64 Kb (92,816 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
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);
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) {
{
nimTestErrorFlag();
}
}
Stats
- Started
2024-05-11T13:52:11
- Finished
2024-05-11T13:52:12
- Duration
2.0.4 👍 OK
Output
IR
Compiled filesize90.64 Kb (92,816 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
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);
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) {
{
nimTestErrorFlag();
}
}
Stats
- Started
2024-05-11T13:52:12
- Finished
2024-05-11T13:52:12
- Duration
1.6.20 👎 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(2, 18) Error: redefinition of 'heapqueue'; previous declaration here: /home/runner/work/Nim/Nim/temp.nim(1, 11)
fatal.nim(54) sysFatal
Error: unhandled exception: options.nim(662, 14) `false` errGenerated [AssertionDefect]
IR
Compiled filesize90.64 Kb (92,816 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
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);
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) {
{
nimTestErrorFlag();
}
}
Stats
- Started
2024-05-11T13:52:15
- Finished
2024-05-11T13:52:15
- Duration
AST
nnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("heapqueue")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Algo"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("heapqueue"),
newIdentNode("quick")
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("bar")
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("algo"),
newEmptyNode(),
newIdentNode("quick")
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("HeapQueue"),
newIdentNode("int")
),
newEmptyNode()
)
),
nnkCaseStmt.newTree(
newIdentNode("algo"),
nnkOfBranch.newTree(
newIdentNode("heapqueue"),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
newLit(1)
)
)
),
nnkOfBranch.newTree(
newIdentNode("quick"),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
newLit(2)
)
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("len")
)
)
)
)
)
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(2, 18) Error: redefinition of 'heapqueue'; previous declaration here: /home/runner/.choosenim/toolchains/nim-1.4.8/lib/pure/collections/heapqueue.nim(1, 2)
IR
Compiled filesize90.64 Kb (92,816 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
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);
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) {
{
nimTestErrorFlag();
}
}
Stats
- Started
2024-05-11T13:52:17
- Finished
2024-05-11T13:52:18
- Duration
AST
nnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("heapqueue")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Algo"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("heapqueue"),
newIdentNode("quick")
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("bar")
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("algo"),
newEmptyNode(),
newIdentNode("quick")
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("HeapQueue"),
newIdentNode("int")
),
newEmptyNode()
)
),
nnkCaseStmt.newTree(
newIdentNode("algo"),
nnkOfBranch.newTree(
newIdentNode("heapqueue"),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
newLit(1)
)
)
),
nnkOfBranch.newTree(
newIdentNode("quick"),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
newLit(2)
)
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("len")
)
)
)
)
)
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(2, 18) Error: redefinition of 'heapqueue'; previous declaration here: /home/runner/.choosenim/toolchains/nim-1.2.18/lib/pure/collections/heapqueue.nim(1, 2)
IR
Compiled filesize90.64 Kb (92,816 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
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);
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) {
{
nimTestErrorFlag();
}
}
Stats
- Started
2024-05-11T13:52:20
- Finished
2024-05-11T13:52:20
- Duration
AST
nnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("heapqueue")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Algo"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("heapqueue"),
newIdentNode("quick")
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("bar")
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("algo"),
newEmptyNode(),
newIdentNode("quick")
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("HeapQueue"),
newIdentNode("int")
),
newEmptyNode()
)
),
nnkCaseStmt.newTree(
newIdentNode("algo"),
nnkOfBranch.newTree(
newIdentNode("heapqueue"),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
newLit(1)
)
)
),
nnkOfBranch.newTree(
newIdentNode("quick"),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
newLit(2)
)
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("len")
)
)
)
)
)
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(2, 18) Error: redefinition of 'heapqueue'; previous declaration here: /home/runner/.choosenim/toolchains/nim-1.0.10/lib/pure/collections/heapqueue.nim(1, 2)
IR
Compiled filesize90.64 Kb (92,816 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
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);
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) {
{
nimTestErrorFlag();
}
}
Stats
- Started
2024-05-11T13:52:22
- Finished
2024-05-11T13:52:22
- Duration
AST
nnkStmtList.newTree(
nnkImportStmt.newTree(
nnkInfix.newTree(
newIdentNode("/"),
newIdentNode("std"),
newIdentNode("heapqueue")
)
),
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("Algo"),
newEmptyNode(),
nnkEnumTy.newTree(
newEmptyNode(),
newIdentNode("heapqueue"),
newIdentNode("quick")
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
newIdentNode("bar")
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("algo"),
newEmptyNode(),
newIdentNode("quick")
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkVarSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("x"),
nnkBracketExpr.newTree(
newIdentNode("HeapQueue"),
newIdentNode("int")
),
newEmptyNode()
)
),
nnkCaseStmt.newTree(
newIdentNode("algo"),
nnkOfBranch.newTree(
newIdentNode("heapqueue"),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
newLit(1)
)
)
),
nnkOfBranch.newTree(
newIdentNode("quick"),
nnkStmtList.newTree(
nnkCommand.newTree(
newIdentNode("echo"),
newLit(2)
)
)
)
),
nnkCommand.newTree(
newIdentNode("echo"),
nnkDotExpr.newTree(
newIdentNode("x"),
newIdentNode("len")
)
)
)
)
)
#c101490a0 ➡️ 🐛
Diagnostics
metagn introduced a bug at 2024-05-10 11:30:57 +0300
on commit #c101490a0 with message:
remove bad type inference behavior for enum identifiers (#23588)
refs
https://github.com/nim-lang/Nim/issues/23586#issuecomment-2102113750
In #20091 a bad kind of type inference was mistakenly left in where if
an identifier `abc` had an expected type of an enum type `Enum`, and
`Enum` had a member called `abc`, the identifier would change to be that
enum member. This causes bugs where a local symbol can have the same
name as an enum member but have a different value. I had assumed this
behavior was removed since but it wasn't, and CI seems to pass having it
removed.
A separate PR needs to be made for the 2.0 branch because these lines
were moved around during a refactoring in #23123 which is not in 2.0.
The bug is in the files:
compiler/semexprs.nim
tests/lookups/tenumlocalsym.nim
The bug can be in the commits:
- #c91b33aab
- #fcc43fa9c
- #ee59597cd
- #42486e1b2
- #c101490a0
- #1eb9aac2f
- #2e3777d6f
- #2995a0318
- #63398b11f
- #d8e1504ed
(Diagnostics sometimes off-by-one).
Stats
- GCC
11.4.0
- Clang
14.0.0
- NodeJS
20.2
- Created
2024-05-11T13:51:41Z
- 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 54 minutes
bisecting 606
commits at 11
commits per second
from nim.
Pre-existing in general:
import std/heapqueue
proc heapqueue(x: int) = discard
# or type Algo = enum heapqueue
let x = heapqueue
A non-pre-existing version would be:
import std/heapqueue
type Algo = enum heapqueue, quick
let x: Algo = heapqueue # note type annotation
We could disable module symbols in any context where a value is expected but in foo.bar
the compiler expects foo
to have a type. Maybe foo.bar
should be a specific context where module symbols are allowed? But this could break code like:
macro foo(x: typed) = discard
import math
foo(math)
Something that has a better chance of working is not giving module symbols "priority" in symbol lookup (don't break in searchInScopesFilterBy
) because they don't check for overloads so they would be treated as ambiguous and get resolved away but this isn't reliable because the order in which the symbols are imported/declared would affect it.
from nim.
@metagn See Bisect.
from nim.
Related Issues (20)
- Local variables can be prematurely moved to closure, causing use-after-move HOT 2
- Regression: ambiguous identifier
- Regression from 1.6 to 2.0 using static parameter in return type with function taking typeclass HOT 3
- Can't create empty openArray with int8 HOT 8
- Warn on repeated non-trivial evaluations in templates
- Regression: compiler crash on static inference HOT 10
- in std/logging implement removeHandler
- `move(table)` does not move the table HOT 8
- Constructing case object with discriminator of field of other object fails with `the field(s) 'g' are in conflict with this value` HOT 4
- Method calling proc with return value overlapping declared generic type generates invalid C HOT 2
- Variable can be moved while it's being passed as `var` HOT 4
- default value in object variants does not work when embedded in another object
- Using parseopt in nimscript yields unexpected results
- Miscompilation of certain code HOT 2
- Overload resolution changes if void return HOT 2
- `Warning: `=destroy`(dest.value) can raise an unlisted exception: Exception` in refc in 2.0 but not devel with `std/isolation`/`isolate`
- Regression: ICE genCheckedRecordField with unsafeAddr and macros HOT 3
- Segfaults in multithreaded code after recent allocator changes
- Compiler crashes with `internal error: getTypeDescAux(tyGenericParam)` when attempting to get size of aliased unparametrized generic type HOT 2
- `Error: generic instantiation too nested` after using many `compiles(...)` HOT 2
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.