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

Unified Diff: sdk/lib/_internal/compiler/implementation/elements/elements.dart

Issue 11412245: MalformedType used for all invalid type annotations. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 8 years 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: sdk/lib/_internal/compiler/implementation/elements/elements.dart
diff --git a/sdk/lib/_internal/compiler/implementation/elements/elements.dart b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
index 2289215786ace49702251ad5ab5e8b37bf11329d..b0dd1fb7503614ca1efd97fddaf22c296733c52c 100644
--- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart
+++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart
@@ -202,8 +202,6 @@ class Element implements Spannable {
/** See [AmbiguousElement] for documentation. */
bool isAmbiguous() => false;
- bool isMalformed() => false;
-
/**
* Is [:true:] if this element has a corresponding patch.
*
@@ -1348,23 +1346,6 @@ class VoidElement extends Element {
bool impliesType() => true;
}
-class MalformedTypeElement extends Element {
- final TypeAnnotation typeNode;
-
- MalformedTypeElement(this.typeNode, Element enclosing)
- : super(const SourceString('malformed'),
- ElementKind.MALFORMED_TYPE,
- enclosing);
-
- DartType computeType(compiler) => compiler.types.malformedType;
-
- Node parseNode(_) => typeNode;
-
- bool impliesType() => true;
-
- bool isMalformed() => true;
-}
-
/**
* [TypeDeclarationElement] defines the common interface for class/interface
* declarations and typedefs.
@@ -1807,10 +1788,9 @@ abstract class ClassElement extends ScopeContainerElement
class Elements {
static bool isUnresolved(Element e) {
- return e == null || e.isErroneous() || e.isMalformed();
+ return e == null || e.isErroneous();
}
static bool isErroneousElement(Element e) => e != null && e.isErroneous();
- static bool isMalformedElement(Element e) => e != null && e.isMalformed();
static bool isClass(Element e) => e != null && e.kind == ElementKind.CLASS;
static bool isTypedef(Element e) {

Powered by Google App Engine
This is Rietveld 408576698