| Index: pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.strong.expect
|
| diff --git a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.strong.expect b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.strong.expect
|
| index 6d067ababdda6db90d826a0f811bff3a7d383160..d3dfeda7a757c47726710a0001c249c1f6e7b995 100644
|
| --- a/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.strong.expect
|
| +++ b/pkg/front_end/testcases/inference/future_union_async_conditional_2.dart.strong.expect
|
| @@ -12,80 +12,13 @@ class MyFuture<T extends core::Object> extends core::Object implements asy::Futu
|
| method then<S extends core::Object>((self::MyFuture::T) → asy::FutureOr<self::MyFuture::then::S> f, {core::Function onError = null}) → self::MyFuture<self::MyFuture::then::S>
|
| return null;
|
| }
|
| -static method g1(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;
|
| - function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding
|
| - try {
|
| - #L1:
|
| - {
|
| - :return_value = x ? 42 : new self::MyFuture::value<core::int>(42);
|
| - 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;
|
| +static method g1(core::bool x) → asy::Future<core::int> async {
|
| + return x ? 42 : new self::MyFuture::value<core::int>(42);
|
| }
|
| -static method g2(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;
|
| - function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding
|
| - try {
|
| - #L2:
|
| - {
|
| - :return_value = x ? 42 : new self::MyFuture::value<core::int>(42);
|
| - 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;
|
| -}
|
| -static method g3(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;
|
| - function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding
|
| - try {
|
| - #L3:
|
| - {
|
| - core::Object y = x ? 42 : new self::MyFuture::value<dynamic>(42);
|
| - :return_value = y;
|
| - break #L3;
|
| - }
|
| - :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;
|
| +static method g2(core::bool x) → asy::Future<core::int> async
|
| + return x ? 42 : new self::MyFuture::value<core::int>(42);
|
| +static method g3(core::bool x) → asy::Future<core::int> async {
|
| + core::Object y = x ? 42 : new self::MyFuture::value<dynamic>(42);
|
| + return y;
|
| }
|
| static method main() → dynamic {}
|
|
|