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

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

Issue 2931363003: Add type inference for assignments to properties. (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
(Empty)
1 library test;
2 import self as self;
3 import "dart:core" as core;
4
5 class Test1 extends core::Object {
6 field core::int prop = null;
7 constructor •() → void
8 : super core::Object::•()
9 ;
10 static method test(self::Test1 t) → void {
11 core::int v1 = t.{self::Test1::prop} = self::getInt();
12 core::num v2 = t.{self::Test1::prop} = self::getNum();
13 core::int v4 = let final dynamic #t1 = t in let final dynamic #t2 = #t1.{sel f::Test1::prop} in #t2.{core::num::==}(null) ? #t1.{self::Test1::prop} = self::g etInt() : #t2;
14 core::num v5 = let final dynamic #t3 = t in let final dynamic #t4 = #t3.{sel f::Test1::prop} in #t4.{core::num::==}(null) ? #t3.{self::Test1::prop} = self::g etNum() : #t4;
15 core::int v7 = let final dynamic #t5 = t in #t5.{self::Test1::prop} = #t5.{s elf::Test1::prop}.{core::num::+}(self::getInt());
16 core::num v8 = let final dynamic #t6 = t in #t6.{self::Test1::prop} = #t6.{s elf::Test1::prop}.{core::num::+}(self::getNum());
17 core::int v10 = let final dynamic #t7 = t in #t7.{self::Test1::prop} = #t7.{ self::Test1::prop}.{core::num::+}(1);
18 core::int v11 = let final dynamic #t8 = t in let final dynamic #t9 = #t8.{se lf::Test1::prop} in let final dynamic #t10 = #t8.{self::Test1::prop} = #t9.{core ::num::+}(1) in #t9;
19 }
20 }
21 class Test2 extends core::Object {
22 field core::num prop = null;
23 constructor •() → void
24 : super core::Object::•()
25 ;
26 static method test(self::Test2 t) → void {
27 core::int v1 = t.{self::Test2::prop} = self::getInt();
28 core::num v2 = t.{self::Test2::prop} = self::getNum();
29 core::double v3 = t.{self::Test2::prop} = self::getDouble();
30 core::num v4 = let final dynamic #t11 = t in let final dynamic #t12 = #t11.{ self::Test2::prop} in #t12.{core::num::==}(null) ? #t11.{self::Test2::prop} = se lf::getInt() : #t12;
31 core::num v5 = let final dynamic #t13 = t in let final dynamic #t14 = #t13.{ self::Test2::prop} in #t14.{core::num::==}(null) ? #t13.{self::Test2::prop} = se lf::getNum() : #t14;
32 core::num v6 = let final dynamic #t15 = t in let final dynamic #t16 = #t15.{ self::Test2::prop} in #t16.{core::num::==}(null) ? #t15.{self::Test2::prop} = se lf::getDouble() : #t16;
33 core::num v7 = let final dynamic #t17 = t in #t17.{self::Test2::prop} = #t17 .{self::Test2::prop}.{core::num::+}(self::getInt());
34 core::num v8 = let final dynamic #t18 = t in #t18.{self::Test2::prop} = #t18 .{self::Test2::prop}.{core::num::+}(self::getNum());
35 core::num v9 = let final dynamic #t19 = t in #t19.{self::Test2::prop} = #t19 .{self::Test2::prop}.{core::num::+}(self::getDouble());
36 core::num v10 = let final dynamic #t20 = t in #t20.{self::Test2::prop} = #t2 0.{self::Test2::prop}.{core::num::+}(1);
37 core::num v11 = let final dynamic #t21 = t in let final dynamic #t22 = #t21. {self::Test2::prop} in let final dynamic #t23 = #t21.{self::Test2::prop} = #t22. {core::num::+}(1) in #t22;
38 }
39 }
40 class Test3 extends core::Object {
41 field core::double prop = null;
42 constructor •() → void
43 : super core::Object::•()
44 ;
45 static method test3(self::Test3 t) → void {
46 core::num v2 = t.{self::Test3::prop} = self::getNum();
47 core::double v3 = t.{self::Test3::prop} = self::getDouble();
48 core::num v5 = let final dynamic #t24 = t in let final dynamic #t25 = #t24.{ self::Test3::prop} in #t25.{core::num::==}(null) ? #t24.{self::Test3::prop} = se lf::getNum() : #t25;
49 core::double v6 = let final dynamic #t26 = t in let final dynamic #t27 = #t2 6.{self::Test3::prop} in #t27.{core::num::==}(null) ? #t26.{self::Test3::prop} = self::getDouble() : #t27;
50 core::double v7 = let final dynamic #t28 = t in #t28.{self::Test3::prop} = # t28.{self::Test3::prop}.{core::double::+}(self::getInt());
51 core::double v8 = let final dynamic #t29 = t in #t29.{self::Test3::prop} = # t29.{self::Test3::prop}.{core::double::+}(self::getNum());
52 core::double v9 = let final dynamic #t30 = t in #t30.{self::Test3::prop} = # t30.{self::Test3::prop}.{core::double::+}(self::getDouble());
53 core::double v10 = let final dynamic #t31 = t in #t31.{self::Test3::prop} = #t31.{self::Test3::prop}.{core::double::+}(1);
54 core::double v11 = let final dynamic #t32 = t in let final dynamic #t33 = #t 32.{self::Test3::prop} in let final dynamic #t34 = #t32.{self::Test3::prop} = #t 33.{core::double::+}(1) in #t33;
55 }
56 }
57 static method getInt() → core::int
58 return 0;
59 static method getNum() → core::num
60 return 0;
61 static method getDouble() → core::double
62 return 0.0;
63 static method main() → dynamic {}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698