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

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: 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/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));

Powered by Google App Engine
This is Rietveld 408576698