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

Unified Diff: pkg/compiler/lib/src/resolution/constructors.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
Index: pkg/compiler/lib/src/resolution/constructors.dart
diff --git a/pkg/compiler/lib/src/resolution/constructors.dart b/pkg/compiler/lib/src/resolution/constructors.dart
index 9df156ca83c33f521788e96d3a2bf4f899e71050..97136cc67b9b934110d9511276d8e70458c2c978 100644
--- a/pkg/compiler/lib/src/resolution/constructors.dart
+++ b/pkg/compiler/lib/src/resolution/constructors.dart
@@ -546,7 +546,7 @@ class ConstructorResolver extends CommonResolverVisitor<ConstructorResult> {
result = resolveConstructor(result.type, diagnosticNode, '');
} else {
Element element = result.element;
- if (element.isErroneous) {
+ if (element.isMalformed) {
result = constructorResultForErroneous(diagnosticNode, element);
} else {
result = reportAndCreateErroneousConstructorElement(
@@ -576,7 +576,7 @@ class ConstructorResolver extends CommonResolverVisitor<ConstructorResult> {
assert(invariant(node.receiver, receiver != null,
message: 'No result returned for $node.receiver.'));
if (receiver.kind != null) {
- assert(invariant(node, receiver.element.isErroneous,
+ assert(invariant(node, receiver.element.isMalformed,
message: "Unexpected prefix result: $receiver."));
// We have already found an error.
return receiver;
@@ -634,7 +634,7 @@ class ConstructorResolver extends CommonResolverVisitor<ConstructorResult> {
resolver.enclosingElement, name,
MessageKind.CANNOT_RESOLVE,
{'name': name});
- } else if (element.isErroneous) {
+ } else if (element.isMalformed) {
return constructorResultForErroneous(node, element);
} else if (element.isClass) {
ClassElement cls = element;
« no previous file with comments | « pkg/compiler/lib/src/resolution/class_hierarchy.dart ('k') | pkg/compiler/lib/src/resolution/member_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698