Index: pkg/compiler/lib/src/elements/elements.dart |
diff --git a/pkg/compiler/lib/src/elements/elements.dart b/pkg/compiler/lib/src/elements/elements.dart |
index 60fcb20f2663e0b8141bc271a121e0dfe9e8b9f3..5f13073b168d138f8b04a6e915fe994ba3f33c8c 100644 |
--- a/pkg/compiler/lib/src/elements/elements.dart |
+++ b/pkg/compiler/lib/src/elements/elements.dart |
@@ -86,8 +86,6 @@ class ElementKind { |
const ElementKind('generative_constructor', ElementCategory.FACTORY); |
static const ElementKind FIELD = |
const ElementKind('field', ElementCategory.VARIABLE); |
- static const ElementKind FIELD_LIST = |
- const ElementKind('field_list', ElementCategory.NONE); |
static const ElementKind GENERATIVE_CONSTRUCTOR_BODY = |
const ElementKind('generative_constructor_body', ElementCategory.NONE); |
static const ElementKind COMPILATION_UNIT = |
@@ -272,7 +270,7 @@ abstract class Element implements Entity { |
bool get isInitializingFormal; |
/// `true` if this element represents a resolution error. |
- bool get isErroneous; |
+ bool get isError; |
/// `true` if this element represents an ambiguous name. |
/// |
@@ -281,6 +279,10 @@ abstract class Element implements Entity { |
/// is produced. |
bool get isAmbiguous; |
+ /// True if there has been errors during resolution or parsing of this |
+ /// element. |
+ bool get isMalformed; |
+ |
/// `true` if this element represents an entity whose access causes one or |
/// more warnings. |
bool get isWarnOnUse; |
@@ -422,9 +424,16 @@ abstract class Element implements Entity { |
class Elements { |
static bool isUnresolved(Element e) { |
- return e == null || e.isErroneous; |
+ return e == null || e.isMalformed; |
+ } |
+ |
+ static bool isError(Element e) { |
+ return e != null && e.isError; |
+ } |
+ |
+ static bool isMalformed(Element e) { |
+ return e != null && e.isMalformed; |
} |
- static bool isErroneous(Element e) => e != null && e.isErroneous; |
/// Unwraps [element] reporting any warnings attached to it, if any. |
static Element unwrap(Element element, |
@@ -786,7 +795,7 @@ class Elements { |
/// or otherwise invalid. |
/// |
/// Accessing any field or calling any method defined on [ErroneousElement] |
-/// except [isErroneous] will currently throw an exception. (This might |
+/// except [isError] will currently throw an exception. (This might |
/// change when we actually want more information on the erroneous element, |
/// e.g., the name of the element we were trying to resolve.) |
/// |