Chromium Code Reviews| 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()) { |
|
ngeoffray
2012/09/05 11:46:45
How can the isInstanceMember happen?
karlklose
2012/09/05 14:53:42
It cannot.
|
| + // 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()) { |