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

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

Issue 10834270: Implement call operator. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 fbf0cece90c33e08aaf529e95ae8eaeff874b575..cd0d772dc368852000682e8ccf16ab4bd65ca692 100644
--- a/lib/compiler/implementation/typechecker.dart
+++ b/lib/compiler/implementation/typechecker.dart
@@ -421,7 +421,9 @@ class TypeCheckerVisitor implements Visitor<Type> {
}
Type visitSend(Send node) {
- if (Elements.isClosureSend(node, elements)) {
+ Element element = elements[node];
+
+ if (Elements.isClosureSend(node, element)) {
// TODO(karlklose): Finish implementation.
return types.dynamicType;
}
@@ -464,7 +466,6 @@ class TypeCheckerVisitor implements Visitor<Type> {
// TODO(karlklose): we cannot handle fields.
return unhandledExpression();
}
- Element element = elements[node];
if (element === null) return types.dynamicType;
return computeType(element);
@@ -502,7 +503,6 @@ class TypeCheckerVisitor implements Visitor<Type> {
if (memberType.element === compiler.dynamicClass) return null;
return memberType;
} else {
- Element element = elements[node];
if (element === null) {
fail(node, 'unresolved ${node.selector}');
} else if (element.kind === ElementKind.FUNCTION) {

Powered by Google App Engine
This is Rietveld 408576698