Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Will the restriction about global initializers be lifted? #140

Closed
manoskouk opened this issue Sep 24, 2020 · 1 comment · Fixed by #150
Closed

Will the restriction about global initializers be lifted? #140

manoskouk opened this issue Sep 24, 2020 · 1 comment · Fixed by #150

Comments

@manoskouk
Copy link
Contributor

Hello,
currently, global initializers cannot refer to locally defined globals. However, the first code block here implies that this restriction will be lifted or relaxed. Is it safe to assume that global initializers will be able to refer to already defined local globals?

@rossberg
Copy link
Member

Ah, yes, good point. It probably should, so that they can at least be used sequentially. I think that would be good for other use cases as well, which are completely unrelated to GC.

rossberg pushed a commit that referenced this issue Feb 24, 2021
This was fixed in the interpreter in the last PR, but only fixed the
messages in various assertions. This commit adds a new explicit test for
this.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants