You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
procw(T: type): T {.compileTime.} =default(ptr T)[]
templatey(v: auto): auto=typeof(v) isintdiscardcompiles(y(wint))
procs(): int {.compileTime.} =discarddiscards()
Nim Version
Builds:
Nim Compiler Version 2.0.8 [Linux: amd64]
Compiled at 2024-09-21
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 5935c3bfa9fec6505394867b23510eb5cbab3dbf
active boot switches: -d:release
Does not build:
Nim Compiler Version 2.0.9 [Linux: amd64]
Compiled at 2024-09-22
Copyright (c) 2006-2023 by Andreas Rumpf
git hash: 27381cc60213e19aa34664176bd358ca5e45bd5a
active boot switches: -d:release
Nim Compiler Version 2.1.99 [Linux: amd64]
Compiled at 2024-09-22
Copyright (c) 2006-2024 by Andreas Rumpf
git hash: 755307be61e4ee7b32c8354b2c303d04bdfc3a3e
active boot switches: -d:release
Nim Compiler Version 2.1.99 [Linux: amd64]
Compiled at 2024-09-22
Copyright (c) 2006-2024 by Andreas Rumpf
git hash: d51d88700b2fb3bd228d5e8f7385e2e4a2e2880c
active boot switches: -d:release
Current Output
/tmp/k.nim(5, 9) Error: request to generate code for .compileTime proc: s
Expected Output
No response
Known Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
…port:2.0] (#24152)
fixes#24150, refs #22022
An exception is raised in the `semExprWithType` call, which means `dec
c.inTypeofContext` is never called, but `compiles` allows compilation to
continue. This means `c.inTypeofContext` is left perpetually nonzero,
which prevents `compileTime` evaluation for the rest of the program.
To fix this, `defer:` is used for the `dec c.inTypeofContext` call, as
is done for
[`instCounter`](https://github.com/nim-lang/Nim/blob/d51d88700b2fb3bd228d5e8f7385e2e4a2e2880c/compiler/seminst.nim#L374)
in other parts of the compiler.
(cherry picked from commit a177720)
Description
Nim Version
Builds:
Does not build:
Current Output
Expected Output
No response
Known Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: