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

Unified Diff: pkg/front_end/testcases/inference/infer_assign_to_property_super_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_super_upwards.dart.direct.expect
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_property_super_upwards.dart.direct.expect b/pkg/front_end/testcases/inference/infer_assign_to_property_super_upwards.dart.direct.expect
new file mode 100644
index 0000000000000000000000000000000000000000..829cc0d2db78fe5f38758b365ba8fc71426620c8
--- /dev/null
+++ b/pkg/front_end/testcases/inference/infer_assign_to_property_super_upwards.dart.direct.expect
@@ -0,0 +1,68 @@
+library test;
+import self as self;
+import "dart:core" as core;
+
+class Base extends core::Object {
+ field core::int intProp = null;
+ field core::num numProp = null;
+ field core::double doubleProp = null;
+ constructor •() → void
+ : super core::Object::•()
+ ;
+}
+class Test1 extends self::Base {
+ constructor •() → void
+ : super self::Base::•()
+ ;
+ method test() → void {
+ dynamic v1 = this.{=self::Base::intProp} = self::getInt();
+ dynamic v2 = this.{=self::Base::intProp} = self::getNum();
+ dynamic v4 = let final dynamic #t1 = this.{=self::Base::intProp} in #t1.==(null) ? this.{=self::Base::intProp} = self::getInt() : #t1;
+ dynamic v5 = let final dynamic #t2 = this.{=self::Base::intProp} in #t2.==(null) ? this.{=self::Base::intProp} = self::getNum() : #t2;
+ dynamic v7 = this.{=self::Base::intProp} = this.{=self::Base::intProp}.+(self::getInt());
+ dynamic v8 = this.{=self::Base::intProp} = this.{=self::Base::intProp}.+(self::getNum());
+ dynamic v10 = this.{=self::Base::intProp} = this.{=self::Base::intProp}.+(1);
+ dynamic v11 = let final dynamic #t3 = this.{=self::Base::intProp} in let final dynamic #t4 = this.{=self::Base::intProp} = #t3.+(1) in #t3;
+ }
+}
+class Test2 extends self::Base {
+ constructor •() → void
+ : super self::Base::•()
+ ;
+ method test() → void {
+ dynamic v1 = this.{=self::Base::numProp} = self::getInt();
+ dynamic v2 = this.{=self::Base::numProp} = self::getNum();
+ dynamic v3 = this.{=self::Base::numProp} = self::getDouble();
+ dynamic v4 = let final dynamic #t5 = this.{=self::Base::numProp} in #t5.==(null) ? this.{=self::Base::numProp} = self::getInt() : #t5;
+ dynamic v5 = let final dynamic #t6 = this.{=self::Base::numProp} in #t6.==(null) ? this.{=self::Base::numProp} = self::getNum() : #t6;
+ dynamic v6 = let final dynamic #t7 = this.{=self::Base::numProp} in #t7.==(null) ? this.{=self::Base::numProp} = self::getDouble() : #t7;
+ dynamic v7 = this.{=self::Base::numProp} = this.{=self::Base::numProp}.+(self::getInt());
+ dynamic v8 = this.{=self::Base::numProp} = this.{=self::Base::numProp}.+(self::getNum());
+ dynamic v9 = this.{=self::Base::numProp} = this.{=self::Base::numProp}.+(self::getDouble());
+ dynamic v10 = this.{=self::Base::numProp} = this.{=self::Base::numProp}.+(1);
+ dynamic v11 = let final dynamic #t8 = this.{=self::Base::numProp} in let final dynamic #t9 = this.{=self::Base::numProp} = #t8.+(1) in #t8;
+ }
+}
+class Test3 extends self::Base {
+ constructor •() → void
+ : super self::Base::•()
+ ;
+ method test3() → void {
+ dynamic v2 = this.{=self::Base::doubleProp} = self::getNum();
+ dynamic v3 = this.{=self::Base::doubleProp} = self::getDouble();
+ dynamic v5 = let final dynamic #t10 = this.{=self::Base::doubleProp} in #t10.==(null) ? this.{=self::Base::doubleProp} = self::getNum() : #t10;
+ dynamic v6 = let final dynamic #t11 = this.{=self::Base::doubleProp} in #t11.==(null) ? this.{=self::Base::doubleProp} = self::getDouble() : #t11;
+ dynamic v7 = this.{=self::Base::doubleProp} = this.{=self::Base::doubleProp}.+(self::getInt());
+ dynamic v8 = this.{=self::Base::doubleProp} = this.{=self::Base::doubleProp}.+(self::getNum());
+ dynamic v9 = this.{=self::Base::doubleProp} = this.{=self::Base::doubleProp}.+(self::getDouble());
+ dynamic v10 = this.{=self::Base::doubleProp} = this.{=self::Base::doubleProp}.+(1);
+ dynamic v11 = let final dynamic #t12 = this.{=self::Base::doubleProp} in let final dynamic #t13 = this.{=self::Base::doubleProp} = #t12.+(1) in #t12;
+ }
+}
+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