Chromium Code Reviews| Index: pkg/compiler/lib/src/typechecker.dart |
| diff --git a/pkg/compiler/lib/src/typechecker.dart b/pkg/compiler/lib/src/typechecker.dart |
| index a21913aac27db74fb86e7af9f50291621a88969f..cc2aac77c19d1f7863869df6853b2e072095163a 100644 |
| --- a/pkg/compiler/lib/src/typechecker.dart |
| +++ b/pkg/compiler/lib/src/typechecker.dart |
| @@ -1023,7 +1023,7 @@ class TypeCheckerVisitor extends Visitor<DartType> { |
| ElementAccess computeAccess(Send node, String name, Element element, |
| MemberKind memberKind, |
| {bool lookupClassMember: false}) { |
| - if (element != null && element.isErroneous) { |
| + if (Elements.isMalformed(element)) { |
| // An error has already been reported for this node. |
|
Johnni Winther
2015/10/21 07:51:56
This comment will not be true for all malformed, t
sigurdm
2015/10/22 07:33:14
Removed the comment
|
| return const DynamicAccess(); |
| } |
| @@ -1063,7 +1063,7 @@ class TypeCheckerVisitor extends Visitor<DartType> { |
| if (element == null) { |
| // foo() where foo is unresolved. |
| return lookupMember(node, thisType, name, memberKind, null); |
| - } else if (element.isErroneous) { |
| + } else if (element.isMalformed) { |
| // foo() where foo is erroneous. |
| return const DynamicAccess(); |
| } else if (element.impliesType) { |
| @@ -1206,7 +1206,7 @@ class TypeCheckerVisitor extends Visitor<DartType> { |
| DartType type = analyze(node.selector); |
| return analyzeInvocation(node, new TypeAccess(type)); |
| } |
| - } else if (Elements.isErroneous(element) && selector == null) { |
| + } else if (Elements.isMalformed(element) && selector == null) { |
| // exp() where exp is an erroneous construct like `new Unresolved()`. |
| DartType type = analyze(node.selector); |
| return analyzeInvocation(node, new TypeAccess(type)); |