Index: compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java |
diff --git a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java |
index cf57f3d778787fded2a1109c98abf8e8b34d4ea7..04a68412644be64a2dc3ea8ed19ac04e57adba9b 100644 |
--- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java |
+++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java |
@@ -2163,6 +2163,15 @@ public class TypeAnalyzer implements DartCompilationPhase { |
return dynamicType; |
default: |
type = element.getType(); |
+ // attempt to resolve to "call()" method invocation |
+ if (type instanceof InterfaceType) { |
+ InterfaceType interfaceType = (InterfaceType) type; |
+ Element callElement = interfaceType.getElement().lookupLocalElement("call"); |
+ if (ElementKind.of(callElement) == ElementKind.METHOD) { |
+ node.setElement(callElement); |
+ type = typeAsMemberOf(callElement, interfaceType); |
+ } |
+ } |
break; |
} |
return checkInvocation(node, target, name, type); |