| Index: editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/StaticTypeAnalyzer.java
|
| diff --git a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/StaticTypeAnalyzer.java b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/StaticTypeAnalyzer.java
|
| index 9d7697872b2edfb9f1cbd4fff1caec9b5ad306b7..14cbe315dd8bd105374a6529bb5e7094aabe0338 100644
|
| --- a/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/StaticTypeAnalyzer.java
|
| +++ b/editor/tools/plugins/com.google.dart.engine/src/com/google/dart/engine/internal/resolver/StaticTypeAnalyzer.java
|
| @@ -1283,10 +1283,8 @@ public class StaticTypeAnalyzer extends SimpleASTVisitor<Void> {
|
| // type = typeProvider.getTypeType());
|
| // }
|
| } else if (element instanceof VariableElement) {
|
| - staticType = promoteManager.getType(element);
|
| - if (staticType == null) {
|
| - staticType = ((VariableElement) element).getType();
|
| - }
|
| + VariableElement variable = (VariableElement) element;
|
| + staticType = promoteManager.getStaticType(variable);
|
| } else if (element instanceof PrefixElement) {
|
| return null;
|
| } else {
|
| @@ -1495,7 +1493,8 @@ public class StaticTypeAnalyzer extends SimpleASTVisitor<Void> {
|
| return type.getReturnType();
|
| }
|
| } else if (element instanceof VariableElement) {
|
| - Type variableType = ((VariableElement) element).getType();
|
| + VariableElement variable = (VariableElement) element;
|
| + Type variableType = promoteManager.getStaticType(variable);
|
| if (variableType instanceof FunctionType) {
|
| return ((FunctionType) variableType).getReturnType();
|
| }
|
|
|