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

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

Issue 2905123002: Perform type inference on explicitly typed fields. (Closed)
Patch Set: Created 3 years, 7 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 test; 1 library test;
2 import self as self; 2 import self as self;
3 import "dart:core" as core; 3 import "dart:core" as core;
4 4
5 static field core::List<core::int> x1 = <dynamic>[1, 2, 3]; 5 static field core::List<core::int> x1 = <core::int>[1, 2, 3];
6 static field core::List<core::num> x2 = <dynamic>[1, 2.0, 3]; 6 static field core::List<core::num> x2 = <core::num>[1, 2.0, 3];
7 static method test1() → dynamic { 7 static method test1() → dynamic {
8 self::x1.{core::List::add}("hi"); 8 self::x1.{core::List::add}("hi");
9 self::x1.{core::List::add}(4.0); 9 self::x1.{core::List::add}(4.0);
10 self::x1.{core::List::add}(4); 10 self::x1.{core::List::add}(4);
11 core::List<core::num> y = self::x1; 11 core::List<core::num> y = self::x1;
12 } 12 }
13 static method test2() → dynamic { 13 static method test2() → dynamic {
14 self::x2.{core::List::add}("hi"); 14 self::x2.{core::List::add}("hi");
15 self::x2.{core::List::add}(4.0); 15 self::x2.{core::List::add}(4.0);
16 core::List<core::int> y = self::x2; 16 core::List<core::int> y = self::x2;
17 } 17 }
18 static method main() → dynamic { 18 static method main() → dynamic {
19 self::test1(); 19 self::test1();
20 self::test2(); 20 self::test2();
21 } 21 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698