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

Unified Diff: pkg/front_end/testcases/inference/infer_assign_to_implicit_this_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_implicit_this_upwards.dart.direct.expect
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_implicit_this_upwards.dart.direct.expect b/pkg/front_end/testcases/inference/infer_assign_to_implicit_this_upwards.dart.direct.expect
new file mode 100644
index 0000000000000000000000000000000000000000..38f629343517c67a2cf36f4aa62a40c32bf3d970
--- /dev/null
+++ b/pkg/front_end/testcases/inference/infer_assign_to_implicit_this_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 t = null;
+ constructor •() → void
+ : super core::Object::•()
+ ;
+ method test() → void {
+ dynamic v1 = this.t = self::getInt();
+ dynamic v2 = this.t = self::getNum();
+ dynamic v4 = let final dynamic #t1 = this.t in #t1.==(null) ? this.t = self::getInt() : #t1;
+ dynamic v5 = let final dynamic #t2 = this.t in #t2.==(null) ? this.t = self::getNum() : #t2;
+ dynamic v7 = this.t = this.t.+(self::getInt());
+ dynamic v8 = this.t = this.t.+(self::getNum());
+ dynamic v10 = this.t = this.t.+(1);
+ dynamic v11 = let final dynamic #t3 = this.t in let final dynamic #t4 = this.t = #t3.+(1) in #t3;
+ }
+}
+class Test2 extends core::Object {
+ field core::num t = null;
+ constructor •() → void
+ : super core::Object::•()
+ ;
+ method test() → void {
+ dynamic v1 = this.t = self::getInt();
+ dynamic v2 = this.t = self::getNum();
+ dynamic v3 = this.t = self::getDouble();
+ dynamic v4 = let final dynamic #t5 = this.t in #t5.==(null) ? this.t = self::getInt() : #t5;
+ dynamic v5 = let final dynamic #t6 = this.t in #t6.==(null) ? this.t = self::getNum() : #t6;
+ dynamic v6 = let final dynamic #t7 = this.t in #t7.==(null) ? this.t = self::getDouble() : #t7;
+ dynamic v7 = this.t = this.t.+(self::getInt());
+ dynamic v8 = this.t = this.t.+(self::getNum());
+ dynamic v9 = this.t = this.t.+(self::getDouble());
+ dynamic v10 = this.t = this.t.+(1);
+ dynamic v11 = let final dynamic #t8 = this.t in let final dynamic #t9 = this.t = #t8.+(1) in #t8;
+ }
+}
+class Test3 extends core::Object {
+ field core::double t = null;
+ constructor •() → void
+ : super core::Object::•()
+ ;
+ method test3() → void {
+ dynamic v2 = this.t = self::getNum();
+ dynamic v3 = this.t = self::getDouble();
+ dynamic v5 = let final dynamic #t10 = this.t in #t10.==(null) ? this.t = self::getNum() : #t10;
+ dynamic v6 = let final dynamic #t11 = this.t in #t11.==(null) ? this.t = self::getDouble() : #t11;
+ dynamic v7 = this.t = this.t.+(self::getInt());
+ dynamic v8 = this.t = this.t.+(self::getNum());
+ dynamic v9 = this.t = this.t.+(self::getDouble());
+ dynamic v10 = this.t = this.t.+(1);
+ dynamic v11 = let final dynamic #t12 = this.t in let final dynamic #t13 = this.t = #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