-
-
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
Const block variable memory being reused unexpectedly #13918
Closed
guzba opened this issue
Apr 7, 2020
· 1 comment
· Fixed by #21351 · May be fixed by timotheecour/Nim#795
Closed
Const block variable memory being reused unexpectedly #13918
guzba opened this issue
Apr 7, 2020
· 1 comment
· Fixed by #21351 · May be fixed by timotheecour/Nim#795
Comments
Same issue as #10938 |
This was referenced Aug 3, 2021
Araq
pushed a commit
that referenced
this issue
Mar 1, 2023
capocasa
pushed a commit
to capocasa/Nim
that referenced
this issue
Mar 31, 2023
nim-lang#20985; always initializes global variables with null values in VM (nim-lang#21351) * fixes nim-lang#10938; always initialize global variable in VM * fixes importc vars * there is a pre-existing issue regarding closure types in the VM * add tests
bung87
pushed a commit
to bung87/Nim
that referenced
this issue
Jul 29, 2023
nim-lang#20985; always initializes global variables with null values in VM (nim-lang#21351) * fixes nim-lang#10938; always initialize global variable in VM * fixes importc vars * there is a pre-existing issue regarding closure types in the VM * add tests
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When using a block to initialize a const at compile time, I am seeing variables keep values from the previous scope / not be re-initialized as expected.
Run with nim c -r test.nim
Current Output
Expected Output
Additional Information
const
tolet
the output is as expected.The text was updated successfully, but these errors were encountered: