Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(698)

Unified Diff: pkg/analyzer/lib/src/dart/element/element.dart

Issue 2346143003: fix #27363, support `@checked` on fields (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/strong/checker_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/element/element.dart
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 433778622c551d350918ed8f8962042142f58fb2..d465b405556fad6a281fb6302d3840935c2c43ba 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -7198,6 +7198,19 @@ class ParameterElementImpl_ofImplicitSetter extends ParameterElementImpl {
}
@override
+ bool get isCovariant {
+ if (inheritsCovariant) {
+ return true;
+ }
+ for (ElementAnnotationImpl annotation in setter.variable.metadata) {
+ if (annotation.isCovariant) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @override
DartType get type => setter.variable.type;
@override
« no previous file with comments | « no previous file | pkg/analyzer/test/src/task/strong/checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698