| 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 89dd0723855eaefe80e2f74fcac6fa7ca380b9f9..1c11c7ea8425c67921bcd53386f6551b6299b1da 100644
|
| --- a/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| +++ b/compiler/java/com/google/dart/compiler/type/TypeAnalyzer.java
|
| @@ -361,6 +361,14 @@ public class TypeAnalyzer implements DartCompilationPhase {
|
| checkAssignable(rhsNode, lhs, rhs);
|
| }
|
| checkAssignableElement(lhsNode);
|
| + // if cascade, then use type of "lhs" qualifier
|
| + if (lhsNode instanceof DartPropertyAccess) {
|
| + DartPropertyAccess lhsAccess = (DartPropertyAccess) lhsNode;
|
| + if (lhsAccess.isCascade()) {
|
| + return lhsAccess.getQualifier().getType();
|
| + }
|
| + }
|
| + // use type or "rhs"
|
| return rhs;
|
| }
|
|
|
| @@ -1976,9 +1984,6 @@ public class TypeAnalyzer implements DartCompilationPhase {
|
|
|
| @Override
|
| public Type visitPropertyAccess(DartPropertyAccess node) {
|
| - if (node.isCascade()) {
|
| - return node.getQualifier().accept(this);
|
| - }
|
| if (node.getType() != null) {
|
| return node.getType();
|
| }
|
|
|