| 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 d70e077e630a5090859cab6c14072a69f673ec08..f244fad5c4fce5840497893743d0d6a0626c3ba2 100644
|
| --- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| +++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| @@ -2818,7 +2818,11 @@ public class TypeAnalyzer implements DartCompilationPhase {
|
| // A subtype of interface Function.
|
| return dynamicType;
|
| } else if (name == null || currentClass == null) {
|
| - return typeError(diagnosticNode, TypeErrorCode.NOT_A_FUNCTION_TYPE, type);
|
| + if (reportNoMemberWhenHasInterceptor || !(type instanceof InterfaceType)
|
| + || !Elements.handlesNoSuchMethod((InterfaceType) type)) {
|
| + return typeError(diagnosticNode, TypeErrorCode.NOT_A_FUNCTION_TYPE, type);
|
| + }
|
| + return dynamicType;
|
| } else {
|
| return typeError(diagnosticNode, TypeErrorCode.NOT_A_METHOD_IN, name, currentClass);
|
| }
|
|
|