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

Unified Diff: sdk/lib/_internal/compiler/implementation/typechecker.dart

Issue 16278004: Report warning on unresolved unqualified access. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Cleanup white-list. Created 7 years, 6 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: sdk/lib/_internal/compiler/implementation/typechecker.dart
diff --git a/sdk/lib/_internal/compiler/implementation/typechecker.dart b/sdk/lib/_internal/compiler/implementation/typechecker.dart
index 856eaa5f9d713770a0488d7a596d959ce161040c..49612a981971842342a9d69edd45c6157209ef70 100644
--- a/sdk/lib/_internal/compiler/implementation/typechecker.dart
+++ b/sdk/lib/_internal/compiler/implementation/typechecker.dart
@@ -550,8 +550,12 @@ class TypeCheckerVisitor extends Visitor<DartType> {
*/
ElementAccess computeResolvedAccess(Send node, SourceString name,
Element element, MemberKind memberKind) {
- if (Elements.isUnresolved(element)) {
+ if (element == null) {
// foo() where foo is unresolved.
+ return lookupMember(node, currentClass.computeType(compiler),
+ name, memberKind);
+ } else if (element.isErroneous()) {
+ // foo() where foo is erroneous.
return const DynamicAccess();
} else if (element.isMember()) {
// foo() where foo is an instance member.
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/lib/isolate_helper.dart ('k') | tests/compiler/dart2js/type_checker_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698