| library; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/regress/issue_34850.dart:5:1: Error: Expected a declaration, but got '<'. |
| // <foo< |
| // ^ |
| // |
| // pkg/front_end/testcases/regress/issue_34850.dart:7:1: Error: Expected '>' after this. |
| // int f1() { |
| // ^^^ |
| // |
| // pkg/front_end/testcases/regress/issue_34850.dart:12:8: Error: Expected '>' after this. |
| // Future<List<int>> f2() async => null; |
| // ^^^^ |
| // |
| // pkg/front_end/testcases/regress/issue_34850.dart:12:1: Error: A function declaration needs an explicit list of parameters. |
| // Try adding a parameter list to the function declaration. |
| // Future<List<int>> f2() async => null; |
| // ^^^^^^ |
| // |
| // pkg/front_end/testcases/regress/issue_34850.dart:12:19: Error: Expected '{' before this. |
| // Future<List<int>> f2() async => null; |
| // ^^ |
| // |
| // pkg/front_end/testcases/regress/issue_34850.dart:14:13: Error: Expected a type, but got '>>'. |
| // Future<List<>> f3() async { |
| // ^^ |
| // |
| // pkg/front_end/testcases/regress/issue_34850.dart:5:2: Error: Type 'foo' not found. |
| // <foo< |
| // ^^^ |
| // |
| // pkg/front_end/testcases/regress/issue_34850.dart:5:2: Error: Expected 0 type arguments. |
| // <foo< |
| // ^ |
| // |
| // pkg/front_end/testcases/regress/issue_34850.dart:11:1: Error: Type 'foo' not found. |
| // foo |
| // ^^^ |
| // |
| // pkg/front_end/testcases/regress/issue_34850.dart:14:1: Error: 'Future' isn't a type. |
| // Future<List<>> f3() async { |
| // ^^^^^^ |
| // pkg/front_end/testcases/regress/issue_34850.dart:12:1: Context: This isn't a type. |
| // Future<List<int>> f2() async => null; |
| // ^^^^^^ |
| // |
| // pkg/front_end/testcases/regress/issue_34850.dart:14:1: Error: Expected 0 type arguments. |
| // Future<List<>> f3() async { |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "dart:async" as asy; |
| import "dart:_internal" as _in; |
| |
| static method f1() → invalid-type { |
| return null; |
| } |
| static method Future<List extends core::Object* = dynamic>() → invalid-type {} |
| static method f2() → dynamic /* originally async */ { |
| final asy::_Future<dynamic>* :async_future = new asy::_Future::•<dynamic>(); |
| core::bool* :is_sync = false; |
| FutureOr<dynamic>* :return_value; |
| (dynamic) →* dynamic :async_op_then; |
| (core::Object*, core::StackTrace*) →* dynamic :async_op_error; |
| core::int* :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L1: |
| { |
| :return_value = null; |
| break #L1; |
| } |
| asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync); |
| return; |
| } |
| on dynamic catch(dynamic exception, core::StackTrace* stack_trace) { |
| asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync); |
| } |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_op(){() →* dynamic}; |
| :is_sync = true; |
| return :async_future; |
| } |
| static method f3() → invalid-type /* originally async */ { |
| final asy::_Future<dynamic>* :async_future = new asy::_Future::•<dynamic>(); |
| core::bool* :is_sync = false; |
| FutureOr<dynamic>* :return_value; |
| (dynamic) →* dynamic :async_op_then; |
| (core::Object*, core::StackTrace*) →* dynamic :async_op_error; |
| core::int* :await_jump_var = 0; |
| dynamic :await_ctx_var; |
| function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) → dynamic yielding |
| try { |
| #L2: |
| { |
| :return_value = null; |
| break #L2; |
| } |
| asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync); |
| return; |
| } |
| on dynamic catch(dynamic exception, core::StackTrace* stack_trace) { |
| asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync); |
| } |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_op(){() →* dynamic}; |
| :is_sync = true; |
| return :async_future; |
| } |
| static method main() → dynamic /* originally async */ { |
| final asy::_Future<dynamic>* :async_future = new asy::_Future::•<dynamic>(); |
| core::bool* :is_sync = false; |
| FutureOr<dynamic>* :return_value; |
| (dynamic) →* dynamic :async_op_then; |
| (core::Object*, core::StackTrace*) →* dynamic :async_op_error; |
| core::int* :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 { |
| #L3: |
| { |
| core::print(self::f1()); |
| [yield] let dynamic #t1 = asy::_awaitHelper(self::f2(), :async_op_then, :async_op_error, :async_op) in null; |
| core::print(:result); |
| [yield] let dynamic #t2 = asy::_awaitHelper(self::f3(), :async_op_then, :async_op_error, :async_op) in null; |
| core::print(_in::unsafeCast<invalid-type>(:result)); |
| } |
| asy::_completeOnAsyncReturn(:async_future, :return_value, :is_sync); |
| return; |
| } |
| on dynamic catch(dynamic exception, core::StackTrace* stack_trace) { |
| asy::_completeOnAsyncError(:async_future, exception, stack_trace, :is_sync); |
| } |
| :async_op_then = asy::_asyncThenWrapperHelper(:async_op); |
| :async_op_error = asy::_asyncErrorWrapperHelper(:async_op); |
| :async_op(){() →* dynamic}; |
| :is_sync = true; |
| return :async_future; |
| } |