-
-
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
Error: cannot evaluate at compile time
when using var in a static:
block inside a proc
#8758
Labels
const
`const x=expr` or `static: stmt`
Comments
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Aug 24, 2018
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Aug 24, 2018
timotheecour
added a commit
to timotheecour/Nim
that referenced
this issue
Aug 24, 2018
Minimal test case: proc foo() =
static:
var i = 42
echo i The problem here is that the The proposed solution is: let's push the outer module as owner. CC @Araq |
metagn
added a commit
to metagn/Nim
that referenced
this issue
Sep 8, 2024
fixes nim-lang#8758, fixes nim-lang#10828, fixes nim-lang#12172, fixes nim-lang#21610, fixes nim-lang#23803, refs nim-lang/RFCs#276
metagn
added a commit
to metagn/Nim
that referenced
this issue
Sep 10, 2024
fixes nim-lang#8758, fixes nim-lang#10828, fixes nim-lang#12172, fixes nim-lang#21610, fixes nim-lang#23803, refs nim-lang/RFCs#276
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
reduced from a more complex scenario:
maybe related
{.compileTime.}
var doesn't work inside proc [WONTFIX]{.compileTime.}
var doesn't work inside proc #8733Error: cannot evaluate at compile time
for typedesc parameters (works for generics) [WONTFIX]Error: cannot evaluate at compile time
for typedesc parameters (works for generics) #7596The text was updated successfully, but these errors were encountered: