-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Support for @checked on fields #27363
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
Labels
legacy-area-analyzer
Use area-devexp instead.
P2
A bug or feature request we're likely to work on
type-enhancement
A request for a change that isn't a bug
Comments
Great question! -- @leafpetersen thoughts? |
This sounds good to me. |
Related to #25578 |
If this doesn't already, we may want to consider making this imply |
@leafpetersen - here's a possible counter example? abstract class BaseView {
List<View> get children { ... }
set children(List<View> views) { ... }
}
// intended to be sealed
class MyAppView extends BaseView {
@checked List<MyChildView> children = [];
} edit: add setter & extends :) |
I'd hit send too fast, updated above example. |
Ah good point. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
legacy-area-analyzer
Use area-devexp instead.
P2
A bug or feature request we're likely to work on
type-enhancement
A request for a change that isn't a bug
Currently this code reports an error
ERROR: Invalid override. The type of B.foo= ((int) → void) is not a subtype of A.foo= ((dynamic) → void). ([analyzer] bin/test.dart:10)
.But if I encapsulate the field, then it works fine.
Can / should we make it work similarly for the field case?
The text was updated successfully, but these errors were encountered: