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

Unified Diff: pkg/compiler/lib/src/typechecker.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/ssa/builder.dart ('k') | pkg/compiler/lib/src/universe/call_structure.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..db61f8621e5f1878e3ac2d458c3b98a2d600c72d 100644
--- a/pkg/compiler/lib/src/typechecker.dart
+++ b/pkg/compiler/lib/src/typechecker.dart
@@ -1023,8 +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) {
- // An error has already been reported for this node.
+ if (Elements.isMalformed(element)) {
return const DynamicAccess();
}
if (node.receiver != null) {
@@ -1063,7 +1062,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 +1205,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));
« no previous file with comments | « pkg/compiler/lib/src/ssa/builder.dart ('k') | pkg/compiler/lib/src/universe/call_structure.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698