Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(15)

Unified Diff: tests/language_strong/type_promotion_closure_test.dart

Issue 2774783002: Re-land "Format all multitests" (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « tests/language_strong/type_promotion_assign_test.dart ('k') | tests/language_strong/type_promotion_functions_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698