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
{{ message }}
This repository has been archived by the owner on Feb 22, 2018. It is now read-only.
Hey, thanks for the feedback. This is a duplicate of #52 and dart-lang/sdk#24928. See those issues for more background. 24928 is still open--we have not settled this question yet.
It is a hard one, because supporting this causes widespread readability cost (and possibly performance cost), even in places where the feature is not used. For ahead-of-time compilation it's very helpful to know what is a field vs what is a virtual property.
That said we could make it easier to declare a field @virtual or something along those lines.
BTW, the other reason for the warning: your instances of "B" will have a dummy storage slot that is never used. Sometimes folks don't realize that their objects will be bigger and have unused storage space.
Actually I take that back. One of my cases did need to extend and strikes me as a legit case
It makes use of the parent classes with a fallback implementation for when the field is null
Option<CompletedAction<E>> get completedAction =>
super.completedAction.orElse(() => children
.map((c) => c.completedAction)
.firstWhere((ca) => ca is Some, orElse: () => const None()));
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In the following
String get foo => 'foo';
generates a warning.It doesn't complain if
B implements A
.I've done this for a while and never had any problems. It would seem odd that this would be dissallowed in the language
The text was updated successfully, but these errors were encountered: