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

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

Issue 724133003: Improve error reporting when a mixin application is invalid. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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/lib/src/generated/element_handle.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/element.dart
diff --git a/pkg/analyzer/lib/src/generated/element.dart b/pkg/analyzer/lib/src/generated/element.dart
index 617faf3ff742ecb6b6f7ac72fe4ac41782afa1cd..dce1f1d490e34d56c4d979a9738bcc127dfcdb34 100644
--- a/pkg/analyzer/lib/src/generated/element.dart
+++ b/pkg/analyzer/lib/src/generated/element.dart
@@ -1056,6 +1056,12 @@ abstract class ClassElement implements Element {
bool get isValidMixin;
/**
+ * Return `true` if this mixin errors have already been reported for this
+ * class.
+ */
+ bool get mixinErrorsReported;
scheglov 2014/11/13 23:02:46 Do we really need to add it to the API? Can we add
+
+ /**
* Return the element representing the method that results from looking up the given method in
* this class with respect to the given library, ignoring abstract methods, or `null` if the
* look up fails. The behavior of this method is defined by the Dart Language Specification in
@@ -1530,6 +1536,9 @@ class ClassElementImpl extends ElementImpl implements ClassElement {
bool get isValidMixin => hasModifier(Modifier.MIXIN);
@override
+ bool get mixinErrorsReported => hasModifier(Modifier.MIXIN_ERRORS_REPORTED);
+
+ @override
MethodElement lookUpConcreteMethod(String methodName, LibraryElement library) => _internalLookUpConcreteMethod(methodName, library, true);
@override
@@ -1629,6 +1638,14 @@ class ClassElementImpl extends ElementImpl implements ClassElement {
}
/**
+ * Set whether an error has reported explaining why this class is an
+ * invalid mixin application.
+ */
+ void set mixinErrorsReported(bool value) {
+ setModifier(Modifier.MIXIN_ERRORS_REPORTED, value);
+ }
+
+ /**
* Set whether this class is defined by a typedef construct to correspond to the given value.
*
* @param isTypedef `true` if the class is defined by a typedef construct
@@ -8737,42 +8754,49 @@ class Modifier extends Enum<Modifier> {
static const Modifier MIXIN = const Modifier('MIXIN', 10);
/**
+ * Indicates that an error has reported explaining why this class is an
+ * invalid mixin application.
+ */
+ static const Modifier MIXIN_ERRORS_REPORTED =
+ const Modifier('MIXIN_ERRORS_REPORTED', 11);
+
+ /**
* Indicates that the value of a parameter or local variable might be mutated within the context.
*/
- static const Modifier POTENTIALLY_MUTATED_IN_CONTEXT = const Modifier('POTENTIALLY_MUTATED_IN_CONTEXT', 11);
+ static const Modifier POTENTIALLY_MUTATED_IN_CONTEXT = const Modifier('POTENTIALLY_MUTATED_IN_CONTEXT', 12);
/**
* Indicates that the value of a parameter or local variable might be mutated within the scope.
*/
- static const Modifier POTENTIALLY_MUTATED_IN_SCOPE = const Modifier('POTENTIALLY_MUTATED_IN_SCOPE', 12);
+ static const Modifier POTENTIALLY_MUTATED_IN_SCOPE = const Modifier('POTENTIALLY_MUTATED_IN_SCOPE', 13);
/**
* Indicates that a class contains an explicit reference to 'super'.
*/
- static const Modifier REFERENCES_SUPER = const Modifier('REFERENCES_SUPER', 13);
+ static const Modifier REFERENCES_SUPER = const Modifier('REFERENCES_SUPER', 14);
/**
* Indicates that the pseudo-modifier 'set' was applied to the element.
*/
- static const Modifier SETTER = const Modifier('SETTER', 14);
+ static const Modifier SETTER = const Modifier('SETTER', 15);
/**
* Indicates that the modifier 'static' was applied to the element.
*/
- static const Modifier STATIC = const Modifier('STATIC', 15);
+ static const Modifier STATIC = const Modifier('STATIC', 16);
/**
* Indicates that the element does not appear in the source code but was implicitly created. For
* example, if a class does not define any constructors, an implicit zero-argument constructor
* will be created and it will be marked as being synthetic.
*/
- static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 16);
+ static const Modifier SYNTHETIC = const Modifier('SYNTHETIC', 17);
/**
* Indicates that a class was defined using an alias. TODO(brianwilkerson) This should be renamed
* to 'ALIAS'.
*/
- static const Modifier TYPEDEF = const Modifier('TYPEDEF', 17);
+ static const Modifier TYPEDEF = const Modifier('TYPEDEF', 18);
static const List<Modifier> values = const [
ABSTRACT,
@@ -8786,6 +8810,7 @@ class Modifier extends Enum<Modifier> {
GETTER,
HAS_EXT_URI,
MIXIN,
+ MIXIN_ERRORS_REPORTED,
POTENTIALLY_MUTATED_IN_CONTEXT,
POTENTIALLY_MUTATED_IN_SCOPE,
REFERENCES_SUPER,
« no previous file with comments | « no previous file | pkg/analyzer/lib/src/generated/element_handle.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698