| Index: compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| diff --git a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| index 069c466f4469697f3d8b029be942f003e6e4b4aa..e7f5be730e0595d761fdc891aaea9c73c9957020 100644
|
| --- a/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| +++ b/compiler/javatests/com/google/dart/compiler/type/TypeAnalyzerCompilerTest.java
|
| @@ -42,7 +42,6 @@ import com.google.dart.compiler.ast.DartUnqualifiedInvocation;
|
| import com.google.dart.compiler.common.SourceInfo;
|
| import com.google.dart.compiler.parser.ParserErrorCode;
|
| import com.google.dart.compiler.resolver.ClassElement;
|
| -import com.google.dart.compiler.resolver.ClassNodeElement;
|
| import com.google.dart.compiler.resolver.Element;
|
| import com.google.dart.compiler.resolver.ElementKind;
|
| import com.google.dart.compiler.resolver.MethodElement;
|
| @@ -2050,6 +2049,24 @@ public class TypeAnalyzerCompilerTest extends CompilerTestCase {
|
| assertInferredElementTypeString(testUnit, "d1", "bool");
|
| }
|
|
|
| + public void test_typesPropagation_multiAssign_IfThenElse_whenAsTypeCondition() throws Exception {
|
| + analyzeLibrary(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "f(var v) {",
|
| + " if (v is String) {",
|
| + " var v1 = v;",
|
| + " v = null;",
|
| + " } else {",
|
| + " var v2 = v;",
|
| + " }",
|
| + " var v3 = v;",
|
| + "}",
|
| + "");
|
| + assertInferredElementTypeString(testUnit, "v1", "String");
|
| + assertInferredElementTypeString(testUnit, "v2", "Dynamic");
|
| + assertInferredElementTypeString(testUnit, "v3", "Dynamic");
|
| + }
|
| +
|
| public void test_typesPropagation_multiAssign_While() throws Exception {
|
| analyzeLibrary(
|
| "// filler filler filler filler filler filler filler filler filler filler",
|
|
|