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
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.
In strong mode, a getter may not be overridden if it's defined as a field. For example,
Sub.foo
is invalid, whereasSub.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.cc @munificent @vsmenon
The text was updated successfully, but these errors were encountered: