Index: pkg/front_end/testcases/inference/downwards_inference_for_each.dart.strong.expect |
diff --git a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.strong.expect b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.strong.expect |
index 5371f1448be7a8a034ffc8d52746ed6240f892f8..901636c51634e1e79b5937bfb24a11bf5715dcc6 100644 |
--- a/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.strong.expect |
+++ b/pkg/front_end/testcases/inference/downwards_inference_for_each.dart.strong.expect |
@@ -9,221 +9,43 @@ abstract class MyStream<T extends core::Object> extends asy::Stream<self::MyStre |
} |
static method F<T extends core::Object>() → self::F::T |
return null; |
-static method f() → asy::Future<dynamic> /* originally async */ { |
- final asy::Completer<asy::FutureOr<dynamic>> :completer = asy::Completer::sync<asy::FutureOr<dynamic>>(); |
- asy::FutureOr<dynamic> :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 :saved_try_context_var1; |
- dynamic :exception0; |
- dynamic :stack_trace0; |
- function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
- try { |
- #L1: |
- { |
- dynamic d; |
- core::Object o; |
- for (dynamic x in self::F<dynamic>()) { |
- } |
- for (dynamic x in self::F<core::Iterable<dynamic>>()) { |
- } |
- for (core::Object x in self::F<core::Iterable<core::Object>>()) { |
- } |
- for (final dynamic #t1 in self::F<dynamic>()) { |
- d = #t1; |
- } |
- for (final dynamic #t2 in self::F<dynamic>()) { |
- o = #t2; |
- } |
- { |
- dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::F<dynamic>()); |
- try |
- #L2: |
- while (true) { |
- asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- if(:result) { |
- dynamic x = :for-iterator.current; |
- {} |
- } |
- else |
- break #L2; |
- } |
- finally { |
- asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- :result; |
- } |
- } |
- { |
- dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::F<asy::Stream<dynamic>>()); |
- try |
- #L3: |
- while (true) { |
- asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- if(:result) { |
- dynamic x = :for-iterator.current; |
- {} |
- } |
- else |
- break #L3; |
- } |
- finally { |
- asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- :result; |
- } |
- } |
- { |
- dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::F<asy::Stream<core::Object>>()); |
- try |
- #L4: |
- while (true) { |
- asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- if(:result) { |
- core::Object x = :for-iterator.current; |
- {} |
- } |
- else |
- break #L4; |
- } |
- finally { |
- asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- :result; |
- } |
- } |
- { |
- dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::F<dynamic>()); |
- try |
- #L5: |
- while (true) { |
- asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- if(:result) { |
- final dynamic #t3 = :for-iterator.current; |
- { |
- d = #t3; |
- } |
- } |
- else |
- break #L5; |
- } |
- finally { |
- asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- :result; |
- } |
- } |
- { |
- dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::F<dynamic>()); |
- try |
- #L6: |
- while (true) { |
- asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- if(:result) { |
- final dynamic #t4 = :for-iterator.current; |
- { |
- o = #t4; |
- } |
- } |
- else |
- break #L6; |
- } |
- finally { |
- asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- :result; |
- } |
- } |
- } |
- :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 f() → asy::Future<dynamic> async { |
+ dynamic d; |
+ core::Object o; |
+ for (dynamic x in self::F<dynamic>()) { |
+ } |
+ for (dynamic x in self::F<core::Iterable<dynamic>>()) { |
+ } |
+ for (core::Object x in self::F<core::Iterable<core::Object>>()) { |
+ } |
+ for (final dynamic #t1 in self::F<dynamic>()) { |
+ d = #t1; |
+ } |
+ for (final dynamic #t2 in self::F<dynamic>()) { |
+ o = #t2; |
+ } |
+ await for (dynamic x in self::F<dynamic>()) { |
+ } |
+ await for (dynamic x in self::F<asy::Stream<dynamic>>()) { |
+ } |
+ await for (core::Object x in self::F<asy::Stream<core::Object>>()) { |
+ } |
+ await for (final dynamic #t3 in self::F<dynamic>()) { |
+ d = #t3; |
+ } |
+ await for (final dynamic #t4 in self::F<dynamic>()) { |
+ o = #t4; |
+ } |
} |
-static method main() → asy::Future<dynamic> /* originally async */ { |
- final asy::Completer<asy::FutureOr<dynamic>> :completer = asy::Completer::sync<asy::FutureOr<dynamic>>(); |
- asy::FutureOr<dynamic> :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 :saved_try_context_var1; |
- dynamic :exception0; |
- dynamic :stack_trace0; |
- function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
- try { |
- #L7: |
- { |
- for (core::int x in <core::int>[1, 2, 3]) { |
- } |
- for (core::num x in <core::num>[1, 2, 3]) { |
- } |
- for (core::int x in <core::int>[1, 2, 3]) { |
- } |
- { |
- dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::MyStream::•<core::int>()); |
- try |
- #L8: |
- while (true) { |
- asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- if(:result) { |
- core::int x = :for-iterator.current; |
- {} |
- } |
- else |
- break #L8; |
- } |
- finally { |
- asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- :result; |
- } |
- } |
- { |
- dynamic :for-iterator = new asy::_StreamIterator::•<dynamic>(self::MyStream::•<core::int>()); |
- try |
- #L9: |
- while (true) { |
- asy::_awaitHelper(:for-iterator.moveNext(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- if(:result) { |
- core::int x = :for-iterator.current; |
- {} |
- } |
- else |
- break #L9; |
- } |
- finally { |
- asy::_awaitHelper(:for-iterator.cancel(), :async_op_then, :async_op_error, :async_op); |
- [yield] null; |
- :result; |
- } |
- } |
- } |
- :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 main() → asy::Future<dynamic> async { |
+ for (core::int x in <core::int>[1, 2, 3]) { |
+ } |
+ for (core::num x in <core::num>[1, 2, 3]) { |
+ } |
+ for (core::int x in <core::int>[1, 2, 3]) { |
+ } |
+ await for (core::int x in self::MyStream::•<core::int>()) { |
+ } |
+ await for (core::int x in self::MyStream::•<core::int>()) { |
+ } |
} |