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

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

Issue 1414913002: Introduce .isMalformed (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Address review Created 5 years, 2 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 | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/elements/modelx.dart
diff --git a/pkg/compiler/lib/src/elements/modelx.dart b/pkg/compiler/lib/src/elements/modelx.dart
index 6dfd7511605d8e24d9c4548f1c1b529cca755b6f..3afb337f53cf81505c972108cefa67d22c94fbd1 100644
--- a/pkg/compiler/lib/src/elements/modelx.dart
+++ b/pkg/compiler/lib/src/elements/modelx.dart
@@ -58,7 +58,7 @@ abstract class ElementX extends Element with ElementCommon {
List<MetadataAnnotation> metadataInternal;
ElementX(this.name, this.kind, this.enclosingElement) {
- assert(isErroneous || implementationLibrary != null);
+ assert(isError || implementationLibrary != null);
}
Modifiers get modifiers => Modifiers.EMPTY;
@@ -323,6 +323,8 @@ class ErroneousElementX extends ElementX implements ErroneousElement {
bool get isCyclicRedirection => false;
+ bool get isMalformed => true;
+
PrefixElement get redirectionDeferredPrefix => null;
AbstractFieldElement abstractField;
@@ -636,7 +638,7 @@ class DuplicatedElementX extends AmbiguousElementX {
: super(messageKind, messageArguments, enclosingElement, existingElement,
newElement);
- bool get isErroneous => true;
+ bool get isMalformed => true;
}
class ScopeX {
@@ -1707,7 +1709,7 @@ class ErroneousFieldElementX extends ElementX
get initializer => null;
- bool get isErroneous => true;
+ bool get isMalformed => true;
get nestedClosures {
throw new UnsupportedError("nestedClosures");
@@ -1913,7 +1915,7 @@ class ErroneousInitializingFormalElementX extends ParameterElementX
bool get isLocal => false;
- bool get isErroneous => true;
+ bool get isMalformed => true;
DynamicType get type => const DynamicType();
}
@@ -2280,7 +2282,7 @@ abstract class ConstructorElementX extends FunctionElementX
}
ConstructorElement get effectiveTarget {
- if (Elements.isErroneous(immediateRedirectionTarget)) {
+ if (Elements.isMalformed(immediateRedirectionTarget)) {
return immediateRedirectionTarget;
}
assert(!isRedirectingFactory || internalEffectiveTarget != null);
@@ -2435,7 +2437,7 @@ class SynthesizedConstructorElementX extends ConstructorElementX {
void _computeSignature(Resolution resolution) {
if (hasFunctionSignature) return;
- if (definingConstructor.isErroneous) {
+ if (definingConstructor.isMalformed) {
functionSignature = new FunctionSignatureX(
type: new FunctionType.synthesized(enclosingClass.thisType));
}
« no previous file with comments | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/enqueue.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698