Description
Dart specifies that all members, including fields, can be overridden by subclasses or implemented by interfaces.
dev_compiler does not support overriding fields because it forces fields to be compiled to larger, slower JS. Strong mode in turn therefore makes overriding a field a static error.
When investigating instances of that error, Leaf discovered almost every single case where a field was being overridden was in fact bad code. In most cases, the intent for the "field" was actually to declare an abstract getter/setter.
Flutter (among others) have requested to be able to declare that some members cannot be overridden.
The language has committed to at least declaring fields that can and cannot be overridden or implemented. We have not yet decided:
- If other members can be configured in the same way.
- What the default should be for fields.
- What the default should be for other members.
- What the syntax should be.
- What the semantics are, especially around implicit interfaces.
This bug is to decide and implement those.