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

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

Issue 1863803002: Validation of `@required` params (#26182). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
Index: pkg/analyzer/lib/dart/element/element.dart
diff --git a/pkg/analyzer/lib/dart/element/element.dart b/pkg/analyzer/lib/dart/element/element.dart
index 385849f25e4feeb662990eb495895c78caecffd5..860c02963b5f2e77774e88a8a0a4811f1881cd27 100644
--- a/pkg/analyzer/lib/dart/element/element.dart
+++ b/pkg/analyzer/lib/dart/element/element.dart
@@ -646,6 +646,11 @@ abstract class Element implements AnalysisTarget {
bool get isPublic;
/**
+ * Return `true` if this element has an annotation of the form '@required'.
+ */
+ bool get isRequired;
+
+ /**
* Return `true` if this element is synthetic. A synthetic element is an
* element that is not represented in the source code explicitly, but is
* implied by the source code, such as the default constructor for a class
@@ -830,6 +835,12 @@ abstract class ElementAnnotation implements ConstantEvaluationTarget {
* a proxy object.
*/
bool get isProxy;
+
+ /**
+ * Return `true` if this annotation marks the associated member as being
+ * required.
+ */
+ bool get isRequired;
}
/**
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/dart/element/element.dart » ('j') | pkg/analyzer/lib/src/generated/error_verifier.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698