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

Side by Side Diff: pkg/front_end/testcases/implicit_scope_test.dart.strong.expect

Issue 2954253002: Add type inference for while and do loops. (Closed)
Patch Set: Created 3 years, 6 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 unified diff | Download patch
OLDNEW
1 library; 1 library;
2 import self as self; 2 import self as self;
3 import "dart:core" as core; 3 import "dart:core" as core;
4 import "package:expect/expect.dart" as exp; 4 import "package:expect/expect.dart" as exp;
5 5
6 class ImplicitScopeTest extends core::Object { 6 class ImplicitScopeTest extends core::Object {
7 constructor •() → void 7 constructor •() → void
8 : super core::Object::•() 8 : super core::Object::•()
9 ; 9 ;
10 static method alwaysTrue() → core::bool { 10 static method alwaysTrue() → core::bool {
(...skipping 19 matching lines...) Expand all
30 for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1)) { 30 for (core::int i = 0; i.{core::num::<}(10); i = i.{core::num::+}(1)) {
31 dynamic a = "bar"; 31 dynamic a = "bar";
32 dynamic b = "baz"; 32 dynamic b = "baz";
33 } 33 }
34 exp::Expect::equals("foo", a); 34 exp::Expect::equals("foo", a);
35 exp::Expect::equals(null, b); 35 exp::Expect::equals(null, b);
36 do { 36 do {
37 dynamic a = "bar"; 37 dynamic a = "bar";
38 dynamic b = "baz"; 38 dynamic b = "baz";
39 } 39 }
40 while ("black".==("white")) 40 while ("black".{core::String::==}("white"))
41 exp::Expect::equals("foo", a); 41 exp::Expect::equals("foo", a);
42 exp::Expect::equals(null, b); 42 exp::Expect::equals(null, b);
43 } 43 }
44 } 44 }
45 static method main() → dynamic { 45 static method main() → dynamic {
46 self::ImplicitScopeTest::testMain(); 46 self::ImplicitScopeTest::testMain();
47 } 47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698