-
-
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
Extraneous destructor call during environment init #24729
Comments
var :env
try:
:env = [type node]()
debugEcho ["1"]
`=sink`(:env.v0, NoCopy(v: 3))
debugEcho ["2"]
caller((:anonymous, :env))
debugEcho ["4"]
test2(:env.v0)
finally:
`=destroy`(:env) In |
semantically, this old data does not exist yet - ie we're initializing the environment for the first time. The fact that an environment is being created doesn't really matter: either we're creating |
proc test() =
debugEcho "1"
var v = NoCopy(v: 3)
debugEcho "2"
test2(v) Compare to this snippet - in this case, the stack memory of When emulating this behavior and pulling out |
Description
Nim Version
2.2.0
Current Output
Expected Output
Known Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: