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

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

Issue 10920089: Generate a warning and a runtime error for calls to nonexistent static calls, getters and setters. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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: lib/compiler/implementation/typechecker.dart
diff --git a/lib/compiler/implementation/typechecker.dart b/lib/compiler/implementation/typechecker.dart
index fc82c88311e9514d7b9eadbbafb61a800efa1a99..a91b543db87e19fdafe0fe5063e8ca1c833fba0c 100644
--- a/lib/compiler/implementation/typechecker.dart
+++ b/lib/compiler/implementation/typechecker.dart
@@ -395,7 +395,7 @@ class TypeCheckerVisitor implements Visitor<DartType> {
DartType returnType;
DartType previousType;
final FunctionElement element = elements[node];
- if (Element.isInvalid(element)) return types.dynamicType;
+ if (Element.isUnresolved(element)) return types.dynamicType;
if (element.kind === ElementKind.GENERATIVE_CONSTRUCTOR ||
element.kind === ElementKind.GENERATIVE_CONSTRUCTOR_BODY) {
type = types.dynamicType;
@@ -573,7 +573,7 @@ class TypeCheckerVisitor implements Visitor<DartType> {
if (memberType.element === compiler.dynamicClass) return null;
return memberType;
} else {
- if (element === null) {
+ if (Element.isUnresolved(element)) {
fail(node, 'unresolved ${node.selector}');
} else if (element.kind === ElementKind.FUNCTION) {
return computeType(element);
@@ -710,7 +710,7 @@ class TypeCheckerVisitor implements Visitor<DartType> {
}
DartType computeType(Element element) {
- if (Element.isInvalid(element)) return types.dynamicType;
+ if (Element.isUnresolved(element)) return types.dynamicType;
DartType result = element.computeType(compiler);
return (result !== null) ? result : types.dynamicType;
}

Powered by Google App Engine
This is Rietveld 408576698