-
Notifications
You must be signed in to change notification settings - Fork 1.7k
DDC: Abstract getter or setter overrides declared in class clobber inherited concrete implementations #29914
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
Comments
Possibly related: #29935 |
@kevmoo # 2 DDC issue for Workiva |
this still reproduces (both dartdevc and dartdevk) |
any update on this @jmesserly ? Is this fixed under Dart 2 DDC? |
It is not fixed yet. |
ping. wondering if this will be addressed after dart 2 ships. |
@robbecker-wf sorry it took so long to get back to you, I've been out of the office. Yeah I would like to see if we can fix this now that Dart 2 has shipped. |
Sent out a fix for review: https://dart-review.googlesource.com/c/sdk/+/72073 |
Hey, thanks @jmesserly ! |
Uh oh!
There was an error while loading. Please reload this page.
Declaring abstract getters that override implementations from mixins or superclasses results in the getter being undefined when compiled in the dev compiler.
This issue is also present in the reverse, for setters: declaring abstract setters results in the setter being undefined, which actually throws.
Declaring both abstract getters and setters avoids the issue.
Example:
This is caused by the setter being redefined for these classes, but not the getter:
You can see this issue in this ES6 reduced test case:
We frequently use this pattern of overriding getters in order to update doc comments for subclasses, so it's unfortunate that this is a problem.
This issue is present in Dart 1.24.0 and 1.25.0-dev.1.0
The text was updated successfully, but these errors were encountered: