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

Unified Diff: dart/pkg/compiler/lib/src/elements/modelx.dart

Issue 845183004: Use synthetic elements to recover from errors in signatures.dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 5 years, 11 months 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 | dart/pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dart/pkg/compiler/lib/src/elements/modelx.dart
diff --git a/dart/pkg/compiler/lib/src/elements/modelx.dart b/dart/pkg/compiler/lib/src/elements/modelx.dart
index 9b3bd2eb43cbba0b7c021e28b0fc669bca3e4657..903f205198148729e9ec582505043e4c41cae264 100644
--- a/dart/pkg/compiler/lib/src/elements/modelx.dart
+++ b/dart/pkg/compiler/lib/src/elements/modelx.dart
@@ -1378,6 +1378,8 @@ class ErroneousFieldElementX extends ElementX implements FieldElementX {
FieldElementX copyWithEnclosing(Element enclosingElement) {
throw new UnsupportedError("copyWithEnclosing");
}
+
+ DartType computeType(Compiler compiler) => type;
karlklose 2015/01/12 10:17:07 Why do we need to add this? Do these now flow into
ahe 2015/01/12 10:25:32 I've identified the place that causes an exception
}
/// [Element] for a parameter-like element.
@@ -1482,7 +1484,7 @@ class LocalParameterElementX extends ParameterElementX
/// `A(this.field)`.
class InitializingFormalElementX extends ParameterElementX
implements InitializingFormalElement {
- FieldElement fieldElement;
+ final FieldElement fieldElement;
InitializingFormalElementX(ConstructorElement constructorDeclaration,
VariableDefinitions variables,
@@ -1499,6 +1501,29 @@ class InitializingFormalElementX extends ParameterElementX
bool get isLocal => false;
}
+class ErroneousInitializingFormalElementX extends ParameterElementX
+ implements InitializingFormalElementX {
+ final ErroneousFieldElementX fieldElement;
+
+ ErroneousInitializingFormalElementX(
+ Identifier identifier,
+ Element enclosingElement)
+ : this.fieldElement =
+ new ErroneousFieldElementX(identifier, enclosingElement),
+ super(
+ ElementKind.INITIALIZING_FORMAL,
+ enclosingElement, null, identifier, null);
+
+ VariableDefinitions get definitions => fieldElement.node;
+
+ MemberElement get memberContext => enclosingElement;
+
+ bool get isLocal => false;
+
+ bool get isErroneous => true;
+
+ DynamicType get type => const DynamicType();
+}
class AbstractFieldElementX extends ElementX implements AbstractFieldElement {
FunctionElementX getter;
« no previous file with comments | « no previous file | dart/pkg/compiler/lib/src/resolution/resolution.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698