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

Unified Diff: pkg/front_end/testcases/inference/infer_assign_to_index_set_vs_get.dart.strong.expect

Issue 2926763003: Add type inference for complex assignments whose LHS is an index expression. (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_index_set_vs_get.dart.strong.expect
diff --git a/pkg/front_end/testcases/inference/infer_assign_to_index_set_vs_get.dart.strong.expect b/pkg/front_end/testcases/inference/infer_assign_to_index_set_vs_get.dart.strong.expect
new file mode 100644
index 0000000000000000000000000000000000000000..1d36e9ea6a2152860ea36825518f0619a831f9cc
--- /dev/null
+++ b/pkg/front_end/testcases/inference/infer_assign_to_index_set_vs_get.dart.strong.expect
@@ -0,0 +1,71 @@
+library test;
+import self as self;
+import "dart:core" as core;
+
+class Index extends core::Object {
+ constructor •() → void
+ : super core::Object::•()
+ ;
+}
+class A extends core::Object {
+ constructor •() → void
+ : super core::Object::•()
+ ;
+ operator +(self::F v) → self::C
+ return null;
+ operator -(core::int i) → self::C
+ return null;
+}
+class B extends self::A {
+ constructor •() → void
+ : super self::A::•()
+ ;
+ operator +(self::E v) → self::D
+ return null;
+ operator -(core::int i) → self::D
+ return null;
+}
+class C extends self::B {
+ constructor •() → void
+ : super self::B::•()
+ ;
+}
+class D extends self::C {
+ constructor •() → void
+ : super self::C::•()
+ ;
+}
+class E extends self::D {
+ constructor •() → void
+ : super self::D::•()
+ ;
+}
+class F extends self::E {
+ constructor •() → void
+ : super self::E::•()
+ ;
+}
+class Test extends core::Object {
+ constructor •() → void
+ : super core::Object::•()
+ ;
+ operator [](self::Index i) → self::B
+ return null;
+ operator []=(self::Index i, self::A v) → void {}
+ method test() → void {
+ self::Test t = self::f<self::Test>();
+ t.{self::Test::[]=}(self::f<dynamic>(), self::f<self::A>());
+ let final self::Test #t1 = t in let final dynamic #t2 = self::f<dynamic>() in #t1.{self::Test::[]}(#t2).{core::Object::==}(null) ? let final self::A #t3 = self::f<self::A>() in let final dynamic #t4 = #t1.{self::Test::[]=}(#t2, #t3) in #t3 : null;
+ let final self::Test #t5 = t in let final dynamic #t6 = self::f<dynamic>() in #t5.{self::Test::[]=}(#t6, #t5.{self::Test::[]}(#t6).{self::A::+}(self::f<dynamic>()));
+ let final self::Test #t7 = t in let final dynamic #t8 = self::f<dynamic>() in let final dynamic #t9 = #t7.{self::Test::[]}(#t8).{self::A::-}(1) in let final dynamic #t10 = #t7.{self::Test::[]=}(#t8, #t9) in #t9;
+ let final self::Test #t11 = t in let final dynamic #t12 = self::f<dynamic>() in #t11.{self::Test::[]=}(#t12, #t11.{self::Test::[]}(#t12).{self::A::-}(1));
+ self::A v1 = let final self::Test #t13 = t in let final dynamic #t14 = self::f<dynamic>() in let final self::A #t15 = self::f<self::A>() in let final dynamic #t16 = #t13.{self::Test::[]=}(#t14, #t15) in #t15;
+ self::A v2 = let final self::Test #t17 = t in let final dynamic #t18 = self::f<dynamic>() in let final self::B #t19 = #t17.{self::Test::[]}(#t18) in #t19.{core::Object::==}(null) ? let final self::A #t20 = self::f<self::A>() in let final dynamic #t21 = #t17.{self::Test::[]=}(#t18, #t20) in #t20 : #t19;
+ self::C v3 = let final self::Test #t22 = t in let final dynamic #t23 = self::f<dynamic>() in let final dynamic #t24 = #t22.{self::Test::[]}(#t23).{self::A::+}(self::f<dynamic>()) in let final dynamic #t25 = #t22.{self::Test::[]=}(#t23, #t24) in #t24;
+ self::C v4 = let final self::Test #t26 = t in let final dynamic #t27 = self::f<dynamic>() in let final dynamic #t28 = #t26.{self::Test::[]}(#t27).{self::A::-}(1) in let final dynamic #t29 = #t26.{self::Test::[]=}(#t27, #t28) in #t28;
+ self::A v5 = let final self::Test #t30 = t in let final dynamic #t31 = self::f<dynamic>() in let final self::B #t32 = #t30.{self::Test::[]}(#t31) in let final dynamic #t33 = #t30.{self::Test::[]=}(#t31, #t32.{self::A::-}(1)) in #t32;
+ }
+}
+static method f<T extends core::Object>() → self::f::T
+ return null;
+static method main() → dynamic {}

Powered by Google App Engine
This is Rietveld 408576698