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

Unified Diff: lib/compiler/implementation/resolved_visitor.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/resolved_visitor.dart
diff --git a/lib/compiler/implementation/resolved_visitor.dart b/lib/compiler/implementation/resolved_visitor.dart
index e54557a9cd0fe72f7022ca0f82075d80daa7e2e9..0cad03f884d58750b91a2416e9a626f273e3f432 100644
--- a/lib/compiler/implementation/resolved_visitor.dart
+++ b/lib/compiler/implementation/resolved_visitor.dart
@@ -19,9 +19,13 @@ class ResolvedVisitor<R> extends AbstractVisitor<R> {
} else {
Element element = elements[node];
if (Element.isInvalid(element)) {
- // Example: f() with 'f' unbound.
- // This can only happen inside an instance method.
- return visitDynamicSend(node);
+ if (element == null || element.isInstanceMember()) {
+ // Example: f() with 'f' unbound.
+ // This can only happen inside an instance method.
+ return visitDynamicSend(node);
+ } else {
+ return visitStaticSend(node);
+ }
} else if (element.kind == ElementKind.CLASS) {
internalError("Cannot generate code for send", node: node);
} else if (element.isInstanceMember()) {

Powered by Google App Engine
This is Rietveld 408576698