| 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 07c7fa794fbe8240330b1a0b1b0a8d674171b3ac..9afaa960ff8c18be543a9365a0a9c18fe30f097c 100644
|
| --- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| +++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| @@ -1581,6 +1581,12 @@ public class TypeAnalyzer implements DartCompilationPhase {
|
| public Type visitPropertyAccess(DartPropertyAccess node) {
|
| Element element = node.getElement();
|
| if (element != null) {
|
| + // Element of getter is MethodElement, but Type of getter expression is method return type
|
| + if (element instanceof MethodElement && element.getModifiers().isGetter()
|
| + && node.getType() != null) {
|
| + return node.getType();
|
| + }
|
| + // normal field
|
| return element.getType();
|
| }
|
| DartNode qualifier = node.getQualifier();
|
|
|