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

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

Issue 2939533002: Apply transformations after comparing to golden files. (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/future_then_conditional_4.dart.strong.expect
diff --git a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.strong.expect b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.strong.expect
index 453f1a7c309eb4e430af97a647f3de232e495ce8..57084b1d71f6f80a440b7aaae34121da0c5cb992 100644
--- a/pkg/front_end/testcases/inference/future_then_conditional_4.dart.strong.expect
+++ b/pkg/front_end/testcases/inference/future_then_conditional_4.dart.strong.expect
@@ -14,68 +14,9 @@ class MyFuture<T extends core::Object> extends core::Object implements asy::Futu
}
static method test() → void {
self::MyFuture<core::bool> f;
- self::MyFuture<core::int> t1 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
- final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer::sync<asy::FutureOr<core::int>>();
- asy::FutureOr<core::int> :return_value;
- dynamic :async_op_then;
- dynamic :async_op_error;
- dynamic :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- dynamic :async_temporary_0;
- function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding
- try {
- #L1:
- {
- if(x) {
- :async_temporary_0 = 2;
- }
- else {
- asy::_awaitHelper(new self::MyFuture::value<core::int>(3), :async_op_then, :async_op_error, :async_op);
- [yield] null;
- :async_temporary_0 = :result;
- }
- :return_value = :async_temporary_0;
- break #L1;
- }
- :completer.complete(:return_value);
- return;
- }
- on dynamic catch(dynamic :exception, dynamic :stack_trace) {
- :completer.completeError(:exception, :stack_trace);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- asy::Future::microtask<dynamic>(:async_op);
- return :completer.future;
- });
- self::MyFuture<core::int> t2 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::Future<core::int> /* originally async */ {
- final asy::Completer<asy::FutureOr<core::int>> :completer = asy::Completer::sync<asy::FutureOr<core::int>>();
- asy::FutureOr<core::int> :return_value;
- dynamic :async_op_then;
- dynamic :async_op_error;
- dynamic :await_jump_var = 0;
- dynamic :await_ctx_var;
- dynamic :saved_try_context_var0;
- function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding
- try {
- #L2:
- {
- asy::_awaitHelper(x, :async_op_then, :async_op_error, :async_op);
- [yield] null;
- :return_value = :result ? 2 : new self::MyFuture::value<core::int>(3);
- break #L2;
- }
- :completer.complete(:return_value);
- return;
- }
- on dynamic catch(dynamic :exception, dynamic :stack_trace) {
- :completer.completeError(:exception, :stack_trace);
- }
- :async_op_then = asy::_asyncThenWrapperHelper(:async_op);
- :async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
- asy::Future::microtask<dynamic>(:async_op);
- return :completer.future;
+ self::MyFuture<core::int> t1 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::Future<core::int> async => x ? 2 : await new self::MyFuture::value<core::int>(3));
+ self::MyFuture<core::int> t2 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::Future<core::int> async {
+ return await x ? 2 : new self::MyFuture::value<core::int>(3);
});
self::MyFuture<core::int> t5 = f.{self::MyFuture::then}<core::int>((core::bool x) → core::Object => x ? 2 : new self::MyFuture::value<core::int>(3));
self::MyFuture<core::int> t6 = f.{self::MyFuture::then}<core::int>((core::bool x) → asy::FutureOr<core::int> {

Powered by Google App Engine
This is Rietveld 408576698