| Index: tests/language_strong/type_promotion_more_specific_test.dart
|
| diff --git a/tests/language_strong/type_promotion_more_specific_test.dart b/tests/language_strong/type_promotion_more_specific_test.dart
|
| index 2d47f6b3eed88f84c4f6cd3c49e23007aa364a46..d85f0e1eaad6d59c6ee55303b19353edea570f47 100644
|
| --- a/tests/language_strong/type_promotion_more_specific_test.dart
|
| +++ b/tests/language_strong/type_promotion_more_specific_test.dart
|
| @@ -25,7 +25,9 @@ class D<T> {
|
| class E<T> extends D<T> {
|
| T e;
|
|
|
| - E(e) : this.e = e, super(e);
|
| + E(e)
|
| + : this.e = e,
|
| + super(e);
|
| }
|
|
|
| void main() {
|
| @@ -38,17 +40,21 @@ void testInterface() {
|
| var y;
|
|
|
| A a = new B();
|
| - if (a is B) { // Promotion B << A.
|
| + if (a is B) {
|
| + // Promotion B << A.
|
| x = a.b; //# 01: ok
|
| }
|
| - if (a is C) { // No promotion C !<< A.
|
| + if (a is C) {
|
| + // No promotion C !<< A.
|
| x = a.c; //# 02: static type warning
|
| }
|
| B b = new B();
|
| - if (b is A) { // No promotion B !<< A.
|
| + if (b is A) {
|
| + // No promotion B !<< A.
|
| x = b.b; //# 03: ok
|
| }
|
| - if (x is A) { // No promotion A !<< dynamic.
|
| + if (x is A) {
|
| + // No promotion A !<< dynamic.
|
| y = x.b; //# 04: ok
|
| }
|
| }
|
| @@ -58,24 +64,28 @@ testGeneric() {
|
| var y;
|
|
|
| D d1 = new E<B>(null);
|
| - if (d1 is E) { // Promotion: E << D.
|
| + if (d1 is E) {
|
| + // Promotion: E << D.
|
| x = d1.e; //# 05: ok
|
| }
|
| - if (d1 is E<A>) { // Promotion: E<A> << D.
|
| + if (d1 is E<A>) {
|
| + // Promotion: E<A> << D.
|
| int a = d1.d; //# 06: static type warning
|
| String b = d1.d; //# 07: static type warning
|
| x = d1.e; //# 08: ok
|
| }
|
|
|
| D<A> d2 = new E<B>(null);
|
| - if (d2 is E) { // No promotion: E !<< D<A>
|
| + if (d2 is E) {
|
| + // No promotion: E !<< D<A>
|
| x = d2.e; //# 09: static type warning
|
| int a = d2.e; //# 10: static type warning
|
| String b = d2.e; //# 11: static type warning
|
| }
|
|
|
| D<A> d3 = new E<B>(new B());
|
| - if (d3 is E<B>) { // Promotion: E<B> << D<A>
|
| + if (d3 is E<B>) {
|
| + // Promotion: E<B> << D<A>
|
| x = d3.d.b; //# 12: ok
|
| x = d3.e.b; //# 13: ok
|
| }
|
|
|