Index: tests/language_strong/type_promotion_closure_test.dart |
diff --git a/tests/language_strong/type_promotion_closure_test.dart b/tests/language_strong/type_promotion_closure_test.dart |
index 2a1660d549b78395273bcf066a2f319151b95f53..dd87a1af91f5c69316f425f46e30417143202026 100644 |
--- a/tests/language_strong/type_promotion_closure_test.dart |
+++ b/tests/language_strong/type_promotion_closure_test.dart |
@@ -7,18 +7,26 @@ |
import "package:meta/meta.dart" show virtual; |
class A { |
- @virtual var a = "a"; |
+ @virtual |
+ var a = "a"; |
A operator +(int i) => this; |
} |
+ |
class B extends A { |
- @virtual var b = "b"; |
+ @virtual |
+ var b = "b"; |
} |
+ |
class C extends B { |
- @virtual var c = "c"; |
+ @virtual |
+ var c = "c"; |
} |
+ |
class D extends A { |
- @virtual var d = "d"; |
+ @virtual |
+ var d = "d"; |
} |
+ |
class E extends D implements C { |
var a = ""; |
var b = ""; |
@@ -61,6 +69,7 @@ void test2() { |
void foo() { |
a = new D(); |
} |
+ |
if (a is B) { |
print(a.a); |
print(a.b); //# 02: static type warning |
@@ -72,12 +81,14 @@ void test3() { |
void foo() { |
a = new D(); |
} |
+ |
if (a is B) { |
print(a.a); |
print(a.b); //# 03: static type warning |
void foo() { |
a = new D(); |
} |
+ |
print(a.a); |
print(a.b); //# 04: static type warning |
} |
@@ -88,12 +99,14 @@ void test3a() { |
void foo() { |
a = new D(); |
} |
+ |
if ((((a)) is B)) { |
print(a.a); |
print(a.b); //# 15: static type warning |
void foo() { |
a = new D(); |
} |
+ |
print(a.a); |
print(a.b); //# 16: static type warning |
} |
@@ -150,7 +163,7 @@ void test8() { |
A a = new E(); |
if (a is B |
&& func(() => a.b) //# 09: static type warning |
- ) { |
+ ) { |
print(a.a); |
} |
a = null; |