| 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 c9761333d2a33ed23b0db34c9bfc79ffed9ce477..8d525904c7b79f2703b49d0f9d0e21db3a0bf258 100644
|
| --- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| +++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| @@ -482,6 +482,11 @@ public class TypeAnalyzer implements DartCompilationPhase {
|
| case DYNAMIC:
|
| return member.getType();
|
| default:
|
| + // target.field() as Function invocation.
|
| + if (types.isAssignable(functionType, field.getType())) {
|
| + return dynamicType;
|
| + }
|
| + // "field" is not Function, so bad structure.
|
| return typeError(diagnosticNode, TypeErrorCode.USE_ASSIGNMENT_ON_SETTER,
|
| name, receiver);
|
| }
|
|
|