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

Unified Diff: pkg/front_end/testcases/reorder_super.dart.direct.expect

Issue 2993193002: When reordering constructor initializers, use correct types for temp vars. (Closed)
Patch Set: Created 3 years, 4 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/reorder_super.dart.direct.expect
diff --git a/pkg/front_end/testcases/reorder_super.dart.direct.expect b/pkg/front_end/testcases/reorder_super.dart.direct.expect
new file mode 100644
index 0000000000000000000000000000000000000000..9fa553f90ea1b82fb803ba6a9837e59ce571e152
--- /dev/null
+++ b/pkg/front_end/testcases/reorder_super.dart.direct.expect
@@ -0,0 +1,33 @@
+library;
+import self as self;
+import "dart:core" as core;
+
+class B extends core::Object {
+ field core::num x;
+ field core::String y;
+ constructor •(core::num x, core::String y) → void
+ : self::B::x = x, self::B::y = y, super core::Object::•() {
+ self::events = self::events.+("super(${this.x}, ${this.y})\n");
+ }
+}
+class C extends self::B {
+ final field dynamic z;
+ constructor •() → void
+ : final dynamic #t1 = self::f(1), final dynamic #t2 = self::g(2), self::C::z = self::f(3), super self::B::•(#t1, #t2)
+ ;
+}
+static field core::String events = "";
+static method f(dynamic x) → core::int {
+ self::events = self::events.+("f(${x})\n");
+ return 0;
+}
+static method g(dynamic x) → core::String {
+ self::events = self::events.+("g(${x})\n");
+ return "foo";
+}
+static method main() → dynamic {
+ new self::C::•();
+ if(!self::events.==("f(1)\ng(2)\nf(3)\nsuper(0, foo)\n")) {
+ throw "Unexpected sequence of events: ${self::events}";
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698