-
Notifications
You must be signed in to change notification settings - Fork 129
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requesttype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
In strong mode, a getter may not be overridden if it's defined as a field. For example,
class Super {
final foo;
get bar;
}
class Sub extends Super {
get foo => 12;
get bar => 13
}
Sub.foo
is invalid, whereas Sub.bar
is valid. This affects the public API of a class, so it should be mentioned in the documentation. For forwards-compatibility with future explicit member- or class-level control of virtual-ness, it would probably be good to document this as "this getter cannot be overidden in subclasses" or something like that.
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requesttype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug