| Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java
|
| ===================================================================
|
| --- editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java (revision 23812)
|
| +++ editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/type/InterfaceTypeImpl.java (working copy)
|
| @@ -25,6 +25,7 @@
|
| import com.google.dart.engine.internal.element.member.ConstructorMember;
|
| import com.google.dart.engine.internal.element.member.MethodMember;
|
| import com.google.dart.engine.internal.element.member.PropertyAccessorMember;
|
| +import com.google.dart.engine.type.FunctionType;
|
| import com.google.dart.engine.type.InterfaceType;
|
| import com.google.dart.engine.type.Type;
|
| import com.google.dart.engine.type.TypeVariableType;
|
| @@ -486,6 +487,13 @@
|
| return true;
|
| } else if (type instanceof TypeVariableType) {
|
| return true;
|
| + } else if (type instanceof FunctionType) {
|
| + ClassElement element = getElement();
|
| + MethodElement callMethod = element.lookUpMethod("call", element.getLibrary());
|
| + if (callMethod != null) {
|
| + return callMethod.getType().isSubtypeOf(type);
|
| + }
|
| + return false;
|
| } else if (!(type instanceof InterfaceType)) {
|
| return false;
|
| } else if (this.equals(type)) {
|
|
|