-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Regression from 1.6/2.0.4/devel to 2.0.5: Error: toException(self.eResultPrivate) can raise an unlisted exception: ref LPError
#23519
Comments
@tersec Whats pragma public ?, repro code is wrong. 🤔 |
Honestly, no idea. Apparently whatever it is, it worked before and after 2.0.5. |
Alternative framing: either this is valid code, and 2.0.5 has a bug, or it's not, and 1.6/2.0.4/2.1.1 have an invalid code acceptance bug. But at least one of these statements is true. |
🐧 Linux bisect by @juancarlospaco (collaborator)devel 👍 OKOutput
IRCompiled filesize92.82 Kb (95,048 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
N_LIB_PRIVATE N_NIMCALL(void, nimTestErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_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;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_Init000();
(*inner)();
#else
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminusathdevelatslibatssystemdotnim_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
stable 👍 OKOutput
IRCompiled 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
2.0.2 👍 OKOutput
IRCompiled filesize90.65 Kb (92,824 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
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);
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) {
{
nimTestErrorFlag();
}
} Stats
1.6.14 👍 OKOutput
IRCompiled filesize95.29 Kb (97,576 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#define nimfr_(x, y)
#define nimln_(x, y)
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_DatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_Init000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static N_INLINE(void, initStackBottomWith)(void* locals) {
nimGC_setStackBottom(locals);
}
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) {
void (*volatile inner)(void);
inner = PreMainInner;
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_DatInit000();
initStackBottomWith((void *)&inner);
atmdotdotatsdotdotatsdotdotatsdotchoosenimatstoolchainsatsnimminus1dot6dot14atslibatssystemdotnim_Init000();
(*inner)();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
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) {
{
}
} Stats
1.4.8 👍 OKOutput
IRCompiled filesize91.16 Kb (93,344 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#define nimfr_(x, y)
#define nimln_(x, y)
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static N_INLINE(void, initStackBottomWith)(void* locals) {
nimGC_setStackBottom(locals);
}
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) {
void (*volatile inner)(void);
inner = PreMainInner;
systemDatInit000();
initStackBottomWith((void *)&inner);
systemInit000();
(*inner)();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
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) {
{
}
} Stats
1.2.18 👍 OKOutput
IRCompiled filesize86.88 Kb (88,968 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#define nimfr_(x, y)
#define nimln_(x, y)
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static N_INLINE(void, initStackBottomWith)(void* locals) {
nimGC_setStackBottom(locals);
}
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) {
void (*volatile inner)(void);
inner = PreMainInner;
systemDatInit000();
initStackBottomWith((void *)&inner);
systemInit000();
(*inner)();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
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) {
{
}
} Stats
1.0.10 👎 FAILOutput
IRCompiled filesize86.88 Kb (88,968 bytes)
#define NIM_INTBITS 64
#include "nimbase.h"
#define nimfr_(x, y)
#define nimln_(x, y)
static N_INLINE(void, initStackBottomWith)(void* locals);
N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
static N_INLINE(void, initStackBottomWith)(void* locals) {
nimGC_setStackBottom(locals);
}
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) {
void (*volatile inner)(void);
inner = PreMainInner;
systemDatInit000();
initStackBottomWith((void *)&inner);
systemInit000();
(*inner)();
}
N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
NimMainModule();
}
N_CDECL(void, NimMain)(void) {
void (*volatile inner)(void);
PreMain();
inner = NimMainInner;
initStackBottomWith((void *)&inner);
(*inner)();
}
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) {
{
}
} Stats
ASTnnkStmtList.newTree(
nnkTypeSection.newTree(
nnkTypeDef.newTree(
newIdentNode("ResultError"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("E"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
nnkOfInherit.newTree(
newIdentNode("ValueError")
),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("error"),
newIdentNode("E"),
newEmptyNode()
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("Result"),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("E"),
newEmptyNode(),
newEmptyNode()
)
),
nnkObjectTy.newTree(
newEmptyNode(),
newEmptyNode(),
nnkRecList.newTree(
nnkRecCase.newTree(
nnkIdentDefs.newTree(
newIdentNode("oResultPrivate"),
newIdentNode("bool"),
newEmptyNode()
),
nnkOfBranch.newTree(
newIdentNode("false"),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("eResultPrivate"),
newIdentNode("E"),
newEmptyNode()
)
)
),
nnkOfBranch.newTree(
newIdentNode("true"),
nnkRecList.newTree(
nnkIdentDefs.newTree(
newIdentNode("vResultPrivate"),
newIdentNode("T"),
newEmptyNode()
)
)
)
)
)
)
),
nnkTypeDef.newTree(
newIdentNode("LPError"),
newEmptyNode(),
nnkObjectTy.newTree(
newEmptyNode(),
nnkOfInherit.newTree(
newIdentNode("CatchableError")
),
newEmptyNode()
)
)
),
nnkFuncDef.newTree(
newIdentNode("raiseResultError"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("E"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newEmptyNode(),
nnkIdentDefs.newTree(
newIdentNode("self"),
nnkBracketExpr.newTree(
newIdentNode("Result"),
newIdentNode("T"),
newIdentNode("E")
),
newEmptyNode()
)
),
nnkPragma.newTree(
newIdentNode("noreturn"),
newIdentNode("noinline")
),
newEmptyNode(),
nnkStmtList.newTree(
nnkMixinStmt.newTree(
newIdentNode("toException")
),
nnkWhenStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("E"),
nnkRefTy.newTree(
newIdentNode("Exception")
)
),
nnkStmtList.newTree(
nnkIfStmt.newTree(
nnkElifBranch.newTree(
nnkDotExpr.newTree(
nnkDotExpr.newTree(
newIdentNode("self"),
newIdentNode("eResultPrivate")
),
newIdentNode("isNil")
),
nnkStmtList.newTree(
nnkRaiseStmt.newTree(
nnkObjConstr.newTree(
nnkPar.newTree(
nnkRefTy.newTree(
nnkBracketExpr.newTree(
newIdentNode("ResultError"),
newIdentNode("void")
)
)
),
nnkExprColonExpr.newTree(
newIdentNode("msg"),
newLit("Trying to access value with err (nil)")
)
)
)
)
)
),
nnkRaiseStmt.newTree(
nnkDotExpr.newTree(
newIdentNode("self"),
newIdentNode("eResultPrivate")
)
)
)
),
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("is"),
newIdentNode("E"),
newIdentNode("void")
),
nnkStmtList.newTree(
nnkRaiseStmt.newTree(
nnkObjConstr.newTree(
nnkPar.newTree(
nnkRefTy.newTree(
nnkBracketExpr.newTree(
newIdentNode("ResultError"),
newIdentNode("void")
)
)
),
nnkExprColonExpr.newTree(
newIdentNode("msg"),
newLit("Trying to access value with err")
)
)
)
)
),
nnkElifBranch.newTree(
nnkCall.newTree(
newIdentNode("compiles"),
nnkCall.newTree(
newIdentNode("toException"),
nnkDotExpr.newTree(
newIdentNode("self"),
newIdentNode("eResultPrivate")
)
)
),
nnkStmtList.newTree(
nnkRaiseStmt.newTree(
nnkCall.newTree(
newIdentNode("toException"),
nnkDotExpr.newTree(
newIdentNode("self"),
newIdentNode("eResultPrivate")
)
)
)
)
),
nnkElifBranch.newTree(
nnkCall.newTree(
newIdentNode("compiles"),
nnkPrefix.newTree(
newIdentNode("$"),
nnkDotExpr.newTree(
newIdentNode("self"),
newIdentNode("eResultPrivate")
)
)
),
nnkStmtList.newTree(
nnkRaiseStmt.newTree(
nnkObjConstr.newTree(
nnkPar.newTree(
nnkRefTy.newTree(
nnkBracketExpr.newTree(
newIdentNode("ResultError"),
newIdentNode("E")
)
)
),
nnkExprColonExpr.newTree(
newIdentNode("error"),
nnkDotExpr.newTree(
newIdentNode("self"),
newIdentNode("eResultPrivate")
)
),
nnkExprColonExpr.newTree(
newIdentNode("msg"),
nnkPrefix.newTree(
newIdentNode("$"),
nnkDotExpr.newTree(
newIdentNode("self"),
newIdentNode("eResultPrivate")
)
)
)
)
)
)
),
nnkElse.newTree(
nnkStmtList.newTree(
nnkRaiseStmt.newTree(
nnkObjConstr.newTree(
nnkPar.newTree(
nnkRefTy.newTree(
nnkBracketExpr.newTree(
newIdentNode("ResultError"),
newIdentNode("E")
)
)
),
nnkExprColonExpr.newTree(
newIdentNode("msg"),
newLit("Trying to access value with err")
),
nnkExprColonExpr.newTree(
newIdentNode("error"),
nnkDotExpr.newTree(
newIdentNode("self"),
newIdentNode("eResultPrivate")
)
)
)
)
)
)
)
)
),
nnkTemplateDef.newTree(
newIdentNode("err"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newEmptyNode(),
newEmptyNode()
),
nnkIdentDefs.newTree(
newIdentNode("E"),
nnkPrefix.newTree(
newIdentNode("not"),
newIdentNode("void")
),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("R"),
nnkIdentDefs.newTree(
newIdentNode("R"),
nnkCommand.newTree(
newIdentNode("type"),
nnkBracketExpr.newTree(
newIdentNode("Result"),
newIdentNode("T"),
newIdentNode("E")
)
),
newEmptyNode()
),
nnkIdentDefs.newTree(
newIdentNode("x"),
newIdentNode("untyped"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkObjConstr.newTree(
newIdentNode("R"),
nnkExprColonExpr.newTree(
newIdentNode("oResultPrivate"),
newIdentNode("false")
),
nnkExprColonExpr.newTree(
newIdentNode("eResultPrivate"),
newIdentNode("x")
)
)
)
),
nnkFuncDef.newTree(
newIdentNode("tryValue"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
newIdentNode("E"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("T"),
nnkIdentDefs.newTree(
newIdentNode("self"),
nnkBracketExpr.newTree(
newIdentNode("Result"),
newIdentNode("T"),
newIdentNode("E")
),
newEmptyNode()
)
),
nnkPragma.newTree(
newIdentNode("inline")
),
newEmptyNode(),
nnkStmtList.newTree(
nnkMixinStmt.newTree(
newIdentNode("raiseResultError")
),
nnkCaseStmt.newTree(
nnkDotExpr.newTree(
newIdentNode("self"),
newIdentNode("oResultPrivate")
),
nnkOfBranch.newTree(
newIdentNode("false"),
nnkStmtList.newTree(
nnkCall.newTree(
nnkDotExpr.newTree(
newIdentNode("self"),
newIdentNode("raiseResultError")
)
)
)
),
nnkOfBranch.newTree(
newIdentNode("true"),
nnkStmtList.newTree(
nnkWhenStmt.newTree(
nnkElifBranch.newTree(
nnkInfix.newTree(
newIdentNode("isnot"),
newIdentNode("T"),
newIdentNode("void")
),
nnkStmtList.newTree(
nnkDotExpr.newTree(
newIdentNode("self"),
newIdentNode("vResultPrivate")
)
)
)
)
)
)
)
)
),
nnkPragma.newTree(
newIdentNode("push"),
nnkExprColonExpr.newTree(
newIdentNode("raises"),
nnkBracket.newTree(
)
)
),
nnkPragma.newTree(
newIdentNode("push"),
newIdentNode("public")
),
nnkTemplateDef.newTree(
newIdentNode("tryGet"),
newEmptyNode(),
nnkGenericParams.newTree(
nnkIdentDefs.newTree(
newIdentNode("T"),
nnkPrefix.newTree(
newIdentNode("not"),
newIdentNode("void")
),
newEmptyNode()
),
nnkIdentDefs.newTree(
newIdentNode("E"),
newEmptyNode(),
newEmptyNode()
)
),
nnkFormalParams.newTree(
newIdentNode("T"),
nnkIdentDefs.newTree(
newIdentNode("self"),
nnkBracketExpr.newTree(
newIdentNode("Result"),
newIdentNode("T"),
newIdentNode("E")
),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkCall.newTree(
nnkDotExpr.newTree(
newIdentNode("self"),
newIdentNode("tryValue")
)
)
)
),
nnkFuncDef.newTree(
newIdentNode("toException"),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
nnkRefTy.newTree(
newIdentNode("LPError")
),
nnkIdentDefs.newTree(
newIdentNode("e"),
newIdentNode("string"),
newEmptyNode()
)
),
newEmptyNode(),
newEmptyNode(),
nnkStmtList.newTree(
nnkObjConstr.newTree(
nnkPar.newTree(
nnkRefTy.newTree(
newIdentNode("LPError")
)
),
nnkExprColonExpr.newTree(
newIdentNode("msg"),
newIdentNode("e")
)
)
)
),
nnkProcDef.newTree(
nnkPostfix.newTree(
newIdentNode("*"),
nnkAccQuoted.newTree(
newIdentNode("&")
)
),
newEmptyNode(),
newEmptyNode(),
nnkFormalParams.newTree(
newEmptyNode()
),
nnkPragma.newTree(
nnkExprColonExpr.newTree(
newIdentNode("raises"),
nnkBracket.newTree(
newIdentNode("LPError")
)
)
),
newEmptyNode(),
nnkStmtList.newTree(
nnkLetSection.newTree(
nnkIdentDefs.newTree(
newIdentNode("foo"),
nnkBracketExpr.newTree(
newIdentNode("Result"),
newIdentNode("int"),
newIdentNode("string")
),
nnkCall.newTree(
nnkDotExpr.newTree(
nnkBracketExpr.newTree(
newIdentNode("Result"),
newIdentNode("int"),
newIdentNode("string")
),
newIdentNode("err")
),
newLit("")
)
)
),
nnkDiscardStmt.newTree(
nnkCall.newTree(
nnkDotExpr.newTree(
newIdentNode("foo"),
newIdentNode("tryGet")
)
)
)
)
)
) ??? ➡️ 🐛DiagnosticsThe commit that introduced the bug can not be found, but the bug is in the commits: (Can not find the commit because Nim can not be re-built commit-by-commit to bisect). Stats
🤖 Bug found in |
This compiles with 1.6, 2.0.4, 2.0.5, and 2.1.1 as above: {.push addr.}
{.push do.}
{.push static.}
{.push type.}
{.push _.}
{.push thread.}
{.push final.}
{.push profiler.}
{.push memtracker.}
{.push objchecks.}
{.push intdefine.}
{.push strdefine.}
{.push booldefine.}
{.push cursor.}
{.push noalias.}
{.push uncheckedAssign.}
{.push immediate.}
{.push destructor.}
{.push override.}
{.push requiresInit.}
{.push align.}
{.push nodecl.}
{.push pure.}
{.push nosinks.}
{.push lib.}
{.push dynlib.}
{.push compilerproc.}
{.push core.}
{.push procvar.}
{.push base.}
{.push used.}
{.push fatal.}
{.push error.}
{.push warning.}
{.push hint.}
{.push warningAsError.}
{.push hintAsError.}
{.push line.}
{.push push.}
{.push pop.}
{.push define.}
{.push undef.}
{.push lineDir.}
{.push link.}
{.push compile.}
{.push linksys.}
{.push deprecated.}
{.push varargs.}
{.push callconv.}
{.push debugger.}
{.push on.}
{.push off.}
{.push checks.}
{.push rangeChecks.}
{.push boundChecks.}
{.push overflowChecks.}
{.push nilChecks.}
{.push floatChecks.}
{.push nanChecks.}
{.push infChecks.}
{.push styleChecks.}
{.push staticBoundChecks.}
{.push nonReloadable.}
{.push executeOnReload.}
# this section is apparently intended to be genuinely pragmas
{.push assertions.}
{.push patterns.}
{.push trmacros.}
{.push sinkInference.}
{.push warnings.}
{.push hints.}
{.push optimization.}
{.push writes.}
{.push reads.}
{.push size.}
{.push effects.}
{.push invariant.}
{.push assume.}
{.push assert.}
{.push deadCodeElim.}
{.push safecode.}
{.push package.}
{.push noforward.}
{.push norewrite.}
{.push nodestroy.}
{.push pragma.}
{.push compileTime.}
{.push fieldChecks.}
{.push subschar.}
{.push computedGoto.}
{.push experimental.}
{.push doctype.}
{.push write.}
{.push gensym.}
{.push inject.}
{.push dirty.}
{.push inheritable.}
{.push threadvar.}
{.push asmNoStackFrame.}
{.push implicitStatic.}
{.push global.}
{.push unchecked.}
{.push guard.}
{.push partial.}
{.push explain.}
{.push liftlocals.}
{.push enforceNoRaises.}
# "codegen keywords, but first the ones that are also pragmas"
{.push goto.}
{.push register.}
{.push union.}
{.push packed.}
{.push volatile.}
{.push bycopy.}
{.push byref.}
# "codegen keywords but not pragmas"
{.push auto.}
{.push bool.}
{.push catch.}
{.push char.}
{.push class.}
{.push compl.}
{.push const_cast.}
{.push default.}
{.push delete.}
{.push double.}
{.push dynamic_cast.}
{.push explicit.}
{.push false.}
{.push float.}
{.push friend.}
{.push int.}
{.push long.}
{.push mutable.}
{.push namespace.}
{.push new.}
{.push operator.}
{.push private.}
{.push protected.}
{.push public.}
{.push reinterpret_cast.}
{.push restrict.}
{.push short.}
{.push signed.}
{.push sizeof.}
{.push static_cast.}
{.push struct.}
{.push switch.}
{.push this.}
{.push throw.}
{.push true.}
{.push typedef.}
{.push typeid.}
{.push typeof.}
{.push typename.}
{.push unsigned.}
{.push void.}
{.push alignas.}
{.push alignof.}
{.push constexpr.}
{.push decltype.}
{.push nullptr.}
{.push noexcept.}
{.push thread_local.}
{.push static_assert.}
{.push char16_t.}
{.push char32_t.}
{.push wchar_t.}
{.push stdin.}
{.push stdout.}
{.push stderr.}
{.push inout.}
{.push oneway.}
{.push bitsize.}
{.push all.}
# Something for all these beautiful pragmas to attach to
proc f() = discard
let x = 0 |
|
That can be a nice test actually... 🤔 |
Sure, though some of them are supposed to work and are actual pragmas. I'm not sure any of the "codegen keywords but not pragmas" make sense in this grammatical context though. Not sure what Some of them, e.g., |
Yeah, the regression on ther version-2-0 failed the nightlies |
@juancarlospaco Hi, could you add Nim compiler built on the branch |
I bisected I'm backporting commits from this list: nim-lang/backport#3, and I have lots of commits yet to backport, so this might be fixed by some later commit. But in the mean time, I can revert the commit linked above. |
Yeah, it should be reverted on the version-2-0 branch |
Reverted. @tersec The original example now works on my machine with |
Hi, @narimiran nightlies are still broken on version-2-0 branch => https://github.com/nim-lang/nightlies/actions/runs/8776715740/job/24080631890 probably it's a different cause? |
Today a new batch of backports will come. Let's see if something changes after that. |
Description
1.6 builds,
devel
builds.Nim Version
Builds:
... also builds:
Does not build:
Current Output
Expected Output
No response
Possible Solution
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: