Skip to content
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

with {.push deprecated.}, get unhandled exception: ast.nim(1073, 3) result == nil or result.kind == nkPragma [AssertionDefect] #24167

Closed
tersec opened this issue Sep 25, 2024 · 5 comments · Fixed by #24170
Assignees

Comments

@tersec
Copy link
Contributor

tersec commented Sep 25, 2024

Description

{.push deprecated.}
template j(s: untyped) = s
proc m(): int = discard
j do:
  discard m()

Nim Version

Nim Compiler Version 2.0.8 [Linux: amd64]
Compiled at 2024-09-25
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 5935c3bfa9fec6505394867b23510eb5cbab3dbf
active boot switches: -d:release
Nim Compiler Version 2.0.9 [Linux: amd64]
Compiled at 2024-09-25
Copyright (c) 2006-2023 by Andreas Rumpf

git hash: 9d65507d202afcfdf9421fc1e2c9cba3325059ba
active boot switches: -d:release
Nim Compiler Version 2.1.99 [Linux: amd64]
Compiled at 2024-09-25
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: b9de2bb4f3864d264c3aeffdc630227448ad8c14
active boot switches: -d:release
Nim Compiler Version 2.1.99 [Linux: amd64]
Compiled at 2024-09-25
Copyright (c) 2006-2024 by Andreas Rumpf

git hash: b9de2bb4f3864d264c3aeffdc630227448ad8c14
active boot switches: -d:release

Current Output

Error: unhandled exception: ast.nim(1073, 3) `result == nil or result.kind == nkPragma`  [AssertionDefect]

Expected Output

No internal compiler assertion

Known Workarounds

No response

Additional Information

No response

@ringabout
Copy link
Member

Probably not a regression: can reproduce it on 1.6.0

unhandled exception: suggest.nim(538, 12) result == nil or result.kind == nkPragma [AssertionDefect]

@ringabout
Copy link
Member

!nim c

{.push deprecated.}
template j(s: untyped) = s
proc m(): int = discard
j do:
  discard m()

Copy link
Contributor

🐧 Linux bisect by @ringabout (member)
devel 👎 FAIL

Output


IR

Compiled filesize 0 (0 bytes)

Stats

  • Started 2024-09-25T05:25:31
  • Finished 2024-09-25T05:25:31
  • Duration

AST

nnkStmtList.newTree(
  nnkPragma.newTree(
    newIdentNode("push"),
    newIdentNode("deprecated")
  ),
  nnkTemplateDef.newTree(
    newIdentNode("j"),
    newEmptyNode(),
    newEmptyNode(),
    nnkFormalParams.newTree(
      newEmptyNode(),
      nnkIdentDefs.newTree(
        newIdentNode("s"),
        newIdentNode("untyped"),
        newEmptyNode()
      )
    ),
    newEmptyNode(),
    newEmptyNode(),
    nnkStmtList.newTree(
      newIdentNode("s")
    )
  ),
  nnkProcDef.newTree(
    newIdentNode("m"),
    newEmptyNode(),
    newEmptyNode(),
    nnkFormalParams.newTree(
      newIdentNode("int")
    ),
    newEmptyNode(),
    newEmptyNode(),
    nnkStmtList.newTree(
      nnkDiscardStmt.newTree(
        newEmptyNode()
      )
    )
  ),
  nnkCall.newTree(
    newIdentNode("j"),
    nnkStmtList.newTree(
      nnkDiscardStmt.newTree(
        nnkCall.newTree(
          newIdentNode("m")
        )
      )
    )
  )
)
stable 👎 FAIL

Output


IR

Compiled filesize 0 (0 bytes)

Stats

  • Started 2024-09-25T05:25:34
  • Finished 2024-09-25T05:25:34
  • Duration

AST

nnkStmtList.newTree(
  nnkPragma.newTree(
    newIdentNode("push"),
    newIdentNode("deprecated")
  ),
  nnkTemplateDef.newTree(
    newIdentNode("j"),
    newEmptyNode(),
    newEmptyNode(),
    nnkFormalParams.newTree(
      newEmptyNode(),
      nnkIdentDefs.newTree(
        newIdentNode("s"),
        newIdentNode("untyped"),
        newEmptyNode()
      )
    ),
    newEmptyNode(),
    newEmptyNode(),
    nnkStmtList.newTree(
      newIdentNode("s")
    )
  ),
  nnkProcDef.newTree(
    newIdentNode("m"),
    newEmptyNode(),
    newEmptyNode(),
    nnkFormalParams.newTree(
      newIdentNode("int")
    ),
    newEmptyNode(),
    newEmptyNode(),
    nnkStmtList.newTree(
      nnkDiscardStmt.newTree(
        newEmptyNode()
      )
    )
  ),
  nnkCall.newTree(
    newIdentNode("j"),
    nnkStmtList.newTree(
      nnkDiscardStmt.newTree(
        nnkCall.newTree(
          newIdentNode("m")
        )
      )
    )
  )
)
2.0.8 👎 FAIL

Output


IR

Compiled filesize 0 (0 bytes)

Stats

  • Started 2024-09-25T05:25:35
  • Finished 2024-09-25T05:25:35
  • Duration

AST

nnkStmtList.newTree(
  nnkPragma.newTree(
    newIdentNode("push"),
    newIdentNode("deprecated")
  ),
  nnkTemplateDef.newTree(
    newIdentNode("j"),
    newEmptyNode(),
    newEmptyNode(),
    nnkFormalParams.newTree(
      newEmptyNode(),
      nnkIdentDefs.newTree(
        newIdentNode("s"),
        newIdentNode("untyped"),
        newEmptyNode()
      )
    ),
    newEmptyNode(),
    newEmptyNode(),
    nnkStmtList.newTree(
      newIdentNode("s")
    )
  ),
  nnkProcDef.newTree(
    newIdentNode("m"),
    newEmptyNode(),
    newEmptyNode(),
    nnkFormalParams.newTree(
      newIdentNode("int")
    ),
    newEmptyNode(),
    newEmptyNode(),
    nnkStmtList.newTree(
      nnkDiscardStmt.newTree(
        newEmptyNode()
      )
    )
  ),
  nnkCall.newTree(
    newIdentNode("j"),
    nnkStmtList.newTree(
      nnkDiscardStmt.newTree(
        nnkCall.newTree(
          newIdentNode("m")
        )
      )
    )
  )
)
2.0.0 👎 FAIL

Output


IR

Compiled filesize 0 (0 bytes)

Stats

  • Started 2024-09-25T05:25:38
  • Finished 2024-09-25T05:25:38
  • Duration

AST

nnkStmtList.newTree(
  nnkPragma.newTree(
    newIdentNode("push"),
    newIdentNode("deprecated")
  ),
  nnkTemplateDef.newTree(
    newIdentNode("j"),
    newEmptyNode(),
    newEmptyNode(),
    nnkFormalParams.newTree(
      newEmptyNode(),
      nnkIdentDefs.newTree(
        newIdentNode("s"),
        newIdentNode("untyped"),
        newEmptyNode()
      )
    ),
    newEmptyNode(),
    newEmptyNode(),
    nnkStmtList.newTree(
      newIdentNode("s")
    )
  ),
  nnkProcDef.newTree(
    newIdentNode("m"),
    newEmptyNode(),
    newEmptyNode(),
    nnkFormalParams.newTree(
      newIdentNode("int")
    ),
    newEmptyNode(),
    newEmptyNode(),
    nnkStmtList.newTree(
      nnkDiscardStmt.newTree(
        newEmptyNode()
      )
    )
  ),
  nnkCall.newTree(
    newIdentNode("j"),
    nnkStmtList.newTree(
      nnkDiscardStmt.newTree(
        nnkCall.newTree(
          newIdentNode("m")
        )
      )
    )
  )
)
1.6.20 👎 FAIL

Output


IR

Compiled filesize 0 (0 bytes)

Stats

  • Started 2024-09-25T05:25:40
  • Finished 2024-09-25T05:25:41
  • Duration

AST

nnkStmtList.newTree(
  nnkPragma.newTree(
    newIdentNode("push"),
    newIdentNode("deprecated")
  ),
  nnkTemplateDef.newTree(
    newIdentNode("j"),
    newEmptyNode(),
    newEmptyNode(),
    nnkFormalParams.newTree(
      newEmptyNode(),
      nnkIdentDefs.newTree(
        newIdentNode("s"),
        newIdentNode("untyped"),
        newEmptyNode()
      )
    ),
    newEmptyNode(),
    newEmptyNode(),
    nnkStmtList.newTree(
      newIdentNode("s")
    )
  ),
  nnkProcDef.newTree(
    newIdentNode("m"),
    newEmptyNode(),
    newEmptyNode(),
    nnkFormalParams.newTree(
      newIdentNode("int")
    ),
    newEmptyNode(),
    newEmptyNode(),
    nnkStmtList.newTree(
      nnkDiscardStmt.newTree(
        newEmptyNode()
      )
    )
  ),
  nnkCall.newTree(
    newIdentNode("j"),
    nnkStmtList.newTree(
      nnkDiscardStmt.newTree(
        nnkCall.newTree(
          newIdentNode("m")
        )
      )
    )
  )
)
1.4.8 👍 OK

Output


IR

Compiled filesize 91.25 Kb (93,440 bytes)
#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, file) \
 FR_.line = n; FR_.filename = file;
N_LIB_PRIVATE N_NIMCALL(NI, m__rUXCpNsaFgF4vmDBPkH4vw)(void);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw)(void);
static N_INLINE(void, popFrame)(void);
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);
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
static N_INLINE(void, nimFrame)(TFrame* s) {
 {
  if (!(framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw == ((TFrame*) NIM_NIL))) goto LA3_;
  (*s).calldepth = ((NI16) 0);
 }
 goto LA1_;
 LA3_: ;
 {
  (*s).calldepth = (NI16)((*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).calldepth + ((NI16) 1));
 }
 LA1_: ;
 (*s).prev = framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
 framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = s;
 {
  if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
  callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw();
 }
 LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
 framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = (*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).prev;
}
N_LIB_PRIVATE N_NIMCALL(NI, m__rUXCpNsaFgF4vmDBPkH4vw)(void) {
 NI result;
 nimfr_("m", "/home/runner/work/Nim/Nim/temp.nim");
 result = (NI)0;
 popFrame();
 return result;
}
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) {
{
 NI T1_;
 nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
 T1_ = (NI)0;
 T1_ = m__rUXCpNsaFgF4vmDBPkH4vw();
 (void)(T1_);
 popFrame();
}
}

Stats

  • Started 2024-09-25T05:25:43
  • Finished 2024-09-25T05:25:43
  • Duration
1.2.18 👍 OK

Output


IR

Compiled filesize 86.98 Kb (89,064 bytes)
#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, file) \
 FR_.line = n; FR_.filename = file;
N_LIB_PRIVATE N_NIMCALL(NI, m__rUXCpNsaFgF4vmDBPkH4vw)(void);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw)(void);
static N_INLINE(void, popFrame)(void);
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);
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
static N_INLINE(void, nimFrame)(TFrame* s) {
 {
  if (!(framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw == NIM_NIL)) goto LA3_;
  (*s).calldepth = ((NI16) 0);
 }
 goto LA1_;
 LA3_: ;
 {
  (*s).calldepth = (NI16)((*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).calldepth + ((NI16) 1));
 }
 LA1_: ;
 (*s).prev = framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
 framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = s;
 {
  if (!((*s).calldepth == ((NI16) (((NI) 2000))))) goto LA8_;
  callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw();
 }
 LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
 framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = (*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).prev;
}
N_LIB_PRIVATE N_NIMCALL(NI, m__rUXCpNsaFgF4vmDBPkH4vw)(void) {
 NI result;
 nimfr_("m", "/home/runner/work/Nim/Nim/temp.nim");
 result = (NI)0;
 popFrame();
 return result;
}
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) {
{
 NI T1_;
 nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
 T1_ = (NI)0;
 T1_ = m__rUXCpNsaFgF4vmDBPkH4vw();
 (void)(T1_);
 popFrame();
}
}

Stats

  • Started 2024-09-25T05:25:45
  • Finished 2024-09-25T05:25:45
  • Duration
1.0.10 👍 OK

Output


IR

Compiled filesize 86.08 Kb (88,144 bytes)
#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, file) \
 FR_.line = n; FR_.filename = file;
N_LIB_PRIVATE N_NIMCALL(NI, m__rUXCpNsaFgF4vmDBPkH4vw)(void);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw)(void);
static N_INLINE(void, popFrame)(void);
static N_INLINE(void, initStackBottomWith)(void* locals);
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);
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
extern TFrame* framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
static N_INLINE(void, nimFrame)(TFrame* s) {	NI T1_;
 T1_ = (NI)0;
 {
  if (!(framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw == NIM_NIL)) goto LA4_;
  T1_ = ((NI) 0);
 }
 goto LA2_;
 LA4_: ;
 {
  T1_ = ((NI) ((NI16)((*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).calldepth + ((NI16) 1))));
 }
 LA2_: ;
 (*s).calldepth = ((NI16) (T1_));
 (*s).prev = framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw;
 framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = s;
 {
  if (!((*s).calldepth == ((NI16) (((NI) 2000))))) goto LA9_;
  callDepthLimitReached__mMRdr4sgmnykA9aWeM9aDZlw();
 }
 LA9_: ;
}
static N_INLINE(void, popFrame)(void) {	framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw = (*framePtr__HRfVMH3jYeBJz6Q6X9b6Ptw).prev;
}
N_LIB_PRIVATE N_NIMCALL(NI, m__rUXCpNsaFgF4vmDBPkH4vw)(void) {	NI result;
 nimfr_("m", "/home/runner/work/Nim/Nim/temp.nim");
 result = (NI)0;
 popFrame();
 return result;
}
static N_INLINE(void, initStackBottomWith)(void* locals) {	nimGC_setStackBottom(locals);
}
void PreMainInner(void) {
}
int cmdCount;
char** cmdLine;
char** gEnv;
void PreMain(void) {
 void (*volatile inner)(void);
 inner = PreMainInner;
 systemDatInit000();
 initStackBottomWith((void *)&inner);
 systemInit000();
 (*inner)();
}
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) {
{
 NI T1_;
 nimfr_("temp", "/home/runner/work/Nim/Nim/temp.nim");
 T1_ = (NI)0;
 T1_ = m__rUXCpNsaFgF4vmDBPkH4vw();
 (void)(T1_);
 popFrame();
}
}

Stats

  • Started 2024-09-25T05:25:47
  • Finished 2024-09-25T05:25:47
  • Duration
??? ➡️ 🐛

Diagnostics

The 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
  • GCC 11.4.0
  • Clang 14.0.0
  • NodeJS 20.4
  • Created 2024-09-25T05:25:06Z
  • Comments 2
  • 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 36 mins bisecting 4337 commits at 120 commits per second

@ringabout
Copy link
Member

ringabout commented Sep 25, 2024

In #18124, it set the symbol AST after pragmas processing for templates. So wDeprecate doesn't appear in the ast. The push rule is a bit of obscure. So I'm opening #24170 instead

@ringabout
Copy link
Member

It is probably a problem that https://github.com/nim-lang/Nim/pull/18124 pragmas of template definition generated by macros are processed multiple times

narimiran pushed a commit that referenced this issue Sep 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants