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)
- 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.