| Index: lib/compiler/implementation/elements/elements.dart
|
| diff --git a/lib/compiler/implementation/elements/elements.dart b/lib/compiler/implementation/elements/elements.dart
|
| index 71a7d0007dc859acdfd21e5800441658cf7d6755..aa3b9c43d110a76b2c72f58f3fa5bb1855721886 100644
|
| --- a/lib/compiler/implementation/elements/elements.dart
|
| +++ b/lib/compiler/implementation/elements/elements.dart
|
| @@ -103,6 +103,8 @@ class ElementKind {
|
| const ElementKind('label', ElementCategory.NONE);
|
| static const ElementKind VOID =
|
| const ElementKind('void', ElementCategory.NONE);
|
| + static const ElementKind MALFORMED_TYPE =
|
| + const ElementKind('malformed', ElementCategory.NONE);
|
|
|
| toString() => id;
|
| }
|
| @@ -332,6 +334,10 @@ class Element implements Spannable {
|
| FunctionElement asFunctionElement() => null;
|
|
|
| static bool isInvalid(Element e) => e == null || e.isErroneous();
|
| +
|
| + bool inStaticContext() {
|
| + return modifiers.isStatic();
|
| + }
|
| }
|
|
|
| /**
|
| @@ -1221,6 +1227,17 @@ class VoidElement extends Element {
|
| bool impliesType() => true;
|
| }
|
|
|
| +class MalformedTypeElement extends Element {
|
| + final TypeAnnotation type;
|
| + MalformedTypeElement(this.type, Element enclosing)
|
| + : super(const SourceString('malformed'),
|
| + ElementKind.MALFORMED_TYPE,
|
| + enclosing);
|
| + DartType computeType(compiler) => compiler.types.malformedType;
|
| + Node parseNode(DiagnosticListener dl) => type;
|
| + bool impliesType() => true;
|
| +}
|
| +
|
| /**
|
| * [TypeDeclarationElement] defines the common interface for class/interface
|
| * declarations and typedefs.
|
|
|