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 eea55b77aa95dc5e3e97a87c4ff2b25260dd5a2c..684ba90b8647ead4c308bca9d4fde54070c6bbda 100644 |
--- a/sdk/lib/_internal/compiler/implementation/elements/elements.dart |
+++ b/sdk/lib/_internal/compiler/implementation/elements/elements.dart |
@@ -379,15 +379,13 @@ class Element implements Spannable { |
* to check for unresolvable elements instead of |
* [: element == null :]. |
*/ |
-class ErroneousElement extends Element { |
+class ErroneousElement extends Element implements FunctionElement { |
final MessageKind messageKind; |
final List messageArguments; |
- final SourceString targetName; |
ErroneousElement(this.messageKind, this.messageArguments, |
- this.targetName, Element enclosing) |
- : super(const SourceString('erroneous element'), |
- ElementKind.ERROR, enclosing); |
+ SourceString name, Element enclosing) |
+ : super(name, ElementKind.ERROR, enclosing); |
isErroneous() => true; |
@@ -395,23 +393,7 @@ class ErroneousElement extends Element { |
throw 'unsupported operation on erroneous element'; |
} |
- SourceString get name => unsupported(); |
Link<MetadataAnnotation> get metadata => unsupported(); |
- |
- getLibrary() => enclosingElement.getLibrary(); |
- |
- String toString() { |
- String n = targetName.slowToString(); |
- return '<$n: ${messageKind.message(messageArguments)}>'; |
- } |
-} |
- |
-class ErroneousFunctionElement extends ErroneousElement |
- implements FunctionElement { |
- ErroneousFunctionElement(MessageKind messageKind, List messageArguments, |
- SourceString targetName, Element enclosing) |
- : super(messageKind, messageArguments, targetName, enclosing); |
- |
get type => unsupported(); |
get cachedNode => unsupported(); |
get functionSignature => unsupported(); |
@@ -427,6 +409,13 @@ class ErroneousFunctionElement extends ErroneousElement |
parameterCount(copmiler) => unsupported(); |
get redirectionTarget => this; |
+ |
+ getLibrary() => enclosingElement.getLibrary(); |
+ |
+ String toString() { |
+ String n = name.slowToString(); |
+ return '<$n: ${messageKind.message(messageArguments)}>'; |
+ } |
} |
/** |