Skip to content
This repository was archived by the owner on Feb 22, 2018. It is now read-only.

static fields are different for each generic type instantiation #181

Closed
jmesserly opened this issue May 12, 2015 · 0 comments
Closed

static fields are different for each generic type instantiation #181

jmesserly opened this issue May 12, 2015 · 0 comments

Comments

@jmesserly
Copy link
Contributor

The current codegen puts static fields inside dart.generic ... that's broken, as it means the static field corresponds to the instantiation of the generic class. From outside, we always refer to the dynamic substitution, but from inside, if unqualified static field, we accidentally refer to the current generic type. So, Foo.bar instead of Foo.bar

This can be observed for mutable fields, as well as lazy final ones (it will be initialized multiple times)

Fixed in https://codereview.chromium.org/1133593004

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

1 participant