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
{{ message }}
This repository was archived by the owner on Feb 22, 2018. It is now read-only.
Const can result in use-before-define errors as the code isn't sorted properly. library cycles make this worse, but the bug exists even with a single library, as the initializer expression isn't taken into account at all for class ordering. non-const final fields can hit this too, since we try to pretend they are const if possible.
Fortunately we already have means to codegen lazy fields, as that's how most statics work. So shouldn't be too bad, just need to track it.
At the moment I'm fixing the most egregious case regarding list initializers, by having them codegen a bit differently (avoid the List.from constructor)
Const can result in use-before-define errors as the code isn't sorted properly. library cycles make this worse, but the bug exists even with a single library, as the initializer expression isn't taken into account at all for class ordering. non-const final fields can hit this too, since we try to pretend they are const if possible.
Fortunately we already have means to codegen lazy fields, as that's how most statics work. So shouldn't be too bad, just need to track it.
Related issue on const canonicalization: #29
The text was updated successfully, but these errors were encountered: