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

Unified Diff: pkg/front_end/testcases/inference/infer_assign_to_property_upwards.dart.direct.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 side-by-side diff with in-line comments
Download patch
Index: pkg/front_end/testcases/inference/infer_assign_to_property_upwards.dart.direct.expect
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_property_upwards.dart.direct.expect b/pkg/front_end/testcases/inference/infer_assign_to_property_upwards.dart.direct.expect
new file mode 100644
index 0000000000000000000000000000000000000000..5629d0cd38c840b799effd0d7c9ff790d6be6067
--- /dev/null
+++ b/pkg/front_end/testcases/inference/infer_assign_to_property_upwards.dart.direct.expect
@@ -0,0 +1,63 @@
+library test;
+import self as self;
+import "dart:core" as core;
+
+class Test1 extends core::Object {
+ field core::int prop = null;
+ constructor •() → void
+ : super core::Object::•()
+ ;
+ static method test(self::Test1 t) → void {
+ dynamic v1 = t.prop = self::getInt();
+ dynamic v2 = t.prop = self::getNum();
+ dynamic v4 = let final dynamic #t1 = t in let final dynamic #t2 = #t1.prop in #t2.==(null) ? #t1.prop = self::getInt() : #t2;
+ dynamic v5 = let final dynamic #t3 = t in let final dynamic #t4 = #t3.prop in #t4.==(null) ? #t3.prop = self::getNum() : #t4;
+ dynamic v7 = let final dynamic #t5 = t in #t5.prop = #t5.prop.+(self::getInt());
+ dynamic v8 = let final dynamic #t6 = t in #t6.prop = #t6.prop.+(self::getNum());
+ dynamic v10 = let final dynamic #t7 = t in #t7.prop = #t7.prop.+(1);
+ dynamic v11 = let final dynamic #t8 = t in let final dynamic #t9 = #t8.prop in let final dynamic #t10 = #t8.prop = #t9.+(1) in #t9;
+ }
+}
+class Test2 extends core::Object {
+ field core::num prop = null;
+ constructor •() → void
+ : super core::Object::•()
+ ;
+ static method test(self::Test2 t) → void {
+ dynamic v1 = t.prop = self::getInt();
+ dynamic v2 = t.prop = self::getNum();
+ dynamic v3 = t.prop = self::getDouble();
+ dynamic v4 = let final dynamic #t11 = t in let final dynamic #t12 = #t11.prop in #t12.==(null) ? #t11.prop = self::getInt() : #t12;
+ dynamic v5 = let final dynamic #t13 = t in let final dynamic #t14 = #t13.prop in #t14.==(null) ? #t13.prop = self::getNum() : #t14;
+ dynamic v6 = let final dynamic #t15 = t in let final dynamic #t16 = #t15.prop in #t16.==(null) ? #t15.prop = self::getDouble() : #t16;
+ dynamic v7 = let final dynamic #t17 = t in #t17.prop = #t17.prop.+(self::getInt());
+ dynamic v8 = let final dynamic #t18 = t in #t18.prop = #t18.prop.+(self::getNum());
+ dynamic v9 = let final dynamic #t19 = t in #t19.prop = #t19.prop.+(self::getDouble());
+ dynamic v10 = let final dynamic #t20 = t in #t20.prop = #t20.prop.+(1);
+ dynamic v11 = let final dynamic #t21 = t in let final dynamic #t22 = #t21.prop in let final dynamic #t23 = #t21.prop = #t22.+(1) in #t22;
+ }
+}
+class Test3 extends core::Object {
+ field core::double prop = null;
+ constructor •() → void
+ : super core::Object::•()
+ ;
+ static method test3(self::Test3 t) → void {
+ dynamic v2 = t.prop = self::getNum();
+ dynamic v3 = t.prop = self::getDouble();
+ dynamic v5 = let final dynamic #t24 = t in let final dynamic #t25 = #t24.prop in #t25.==(null) ? #t24.prop = self::getNum() : #t25;
+ dynamic v6 = let final dynamic #t26 = t in let final dynamic #t27 = #t26.prop in #t27.==(null) ? #t26.prop = self::getDouble() : #t27;
+ dynamic v7 = let final dynamic #t28 = t in #t28.prop = #t28.prop.+(self::getInt());
+ dynamic v8 = let final dynamic #t29 = t in #t29.prop = #t29.prop.+(self::getNum());
+ dynamic v9 = let final dynamic #t30 = t in #t30.prop = #t30.prop.+(self::getDouble());
+ dynamic v10 = let final dynamic #t31 = t in #t31.prop = #t31.prop.+(1);
+ dynamic v11 = let final dynamic #t32 = t in let final dynamic #t33 = #t32.prop in let final dynamic #t34 = #t32.prop = #t33.+(1) in #t33;
+ }
+}
+static method getInt() → core::int
+ return 0;
+static method getNum() → core::num
+ return 0;
+static method getDouble() → core::double
+ return 0.0;
+static method main() → dynamic {}

Powered by Google App Engine
This is Rietveld 408576698