| library /*isNonNullableByDefault*/; |
| // |
| // Problems in library: |
| // |
| // pkg/front_end/testcases/nnbd/issue41156.dart:39:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| // String Function(int) x2 = (int v) /* error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| // String Function(int) x3 = (int v) /* error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue41156.dart:49:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| // String Function(int) x5 = (int v) /* error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| // String Function(int) x6 = (int v) /* error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue41156.dart:59:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| // Future<String> Function(int) y2 = (int v) async /* error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| // Future<String> Function(int) y3 = (int v) async /* error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue41156.dart:69:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| // Future<String> Function(int) y5 = (int v) async /* error */ { |
| // ^ |
| // |
| // pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| // Future<String> Function(int) y6 = (int v) async /* error */ { |
| // ^ |
| // |
| import self as self; |
| import "dart:core" as core; |
| import "dart:async" as asy; |
| |
| static method throwing() → Never |
| return throw ""; |
| static method main() → void { |
| (core::int) → core::String x1 = (core::int v) → Never => throw v; |
| (core::int) → core::String x2 = (core::int v) → Never { |
| throw v; |
| }; |
| (core::int) → core::String x3 = (core::int v) → Never { |
| return throw v; |
| }; |
| (core::int) → core::String x4 = (core::int v) → Never => self::throwing(); |
| (core::int) → core::String x5 = (core::int v) → Never { |
| self::throwing(); |
| }; |
| (core::int) → core::String x6 = (core::int v) → Never { |
| return self::throwing(); |
| }; |
| (core::int) → asy::Future<core::String> y1 = (core::int v) → asy::Future<Never> /* originally async */ { |
| final asy::_Future<Never> :async_future = new asy::_Future::•<Never>(); |
| core::bool* :is_sync = false; |
| FutureOr<Never>? :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 = throw v; |
| 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; |
| }; |
| (core::int) → asy::Future<core::String> y2 = (core::int v) → asy::Future<Never> /* originally async */ { |
| final asy::_Future<Never> :async_future = new asy::_Future::•<Never>(); |
| core::bool* :is_sync = false; |
| FutureOr<Never>? :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: |
| { |
| throw v; |
| } |
| 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; |
| }; |
| (core::int) → asy::Future<core::String> y3 = (core::int v) → asy::Future<Never> /* originally async */ { |
| final asy::_Future<Never> :async_future = new asy::_Future::•<Never>(); |
| core::bool* :is_sync = false; |
| FutureOr<Never>? :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 { |
| #L3: |
| { |
| :return_value = throw v; |
| break #L3; |
| } |
| 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; |
| }; |
| (core::int) → asy::Future<core::String> y4 = (core::int v) → asy::Future<Never> /* originally async */ { |
| final asy::_Future<Never> :async_future = new asy::_Future::•<Never>(); |
| core::bool* :is_sync = false; |
| FutureOr<Never>? :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 { |
| #L4: |
| { |
| :return_value = self::throwing(); |
| break #L4; |
| } |
| 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; |
| }; |
| (core::int) → asy::Future<core::String> y5 = (core::int v) → asy::Future<Never> /* originally async */ { |
| final asy::_Future<Never> :async_future = new asy::_Future::•<Never>(); |
| core::bool* :is_sync = false; |
| FutureOr<Never>? :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 { |
| #L5: |
| { |
| self::throwing(); |
| } |
| 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; |
| }; |
| (core::int) → asy::Future<core::String> y6 = (core::int v) → asy::Future<Never> /* originally async */ { |
| final asy::_Future<Never> :async_future = new asy::_Future::•<Never>(); |
| core::bool* :is_sync = false; |
| FutureOr<Never>? :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 { |
| #L6: |
| { |
| :return_value = self::throwing(); |
| break #L6; |
| } |
| 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 errors() → void /* 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 { |
| #L7: |
| { |
| (core::int) → core::String x2 = (core::int v) → core::String { |
| try { |
| throw v; |
| } |
| on core::Object catch(final core::Object _) { |
| } |
| return let final Never #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:39:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| String Function(int) x2 = (int v) /* error */ { |
| ^" in null; |
| }; |
| (core::int) → core::String x3 = (core::int v) → core::String { |
| try { |
| return throw v; |
| } |
| on core::Object catch(final core::Object _) { |
| } |
| return let final Never #t2 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:44:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| String Function(int) x3 = (int v) /* error */ { |
| ^" in null; |
| }; |
| (core::int) → core::String x5 = (core::int v) → core::String { |
| try { |
| self::throwing(); |
| } |
| on core::Object catch(final core::Object _) { |
| } |
| return let final Never #t3 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:49:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| String Function(int) x5 = (int v) /* error */ { |
| ^" in null; |
| }; |
| (core::int) → core::String x6 = (core::int v) → core::String { |
| try { |
| return self::throwing(); |
| } |
| on core::Object catch(final core::Object _) { |
| } |
| return let final Never #t4 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:54:29: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| String Function(int) x6 = (int v) /* error */ { |
| ^" in null; |
| }; |
| (core::int) → asy::Future<core::String> y2 = (core::int v) → asy::Future<core::String> /* originally async */ { |
| final asy::_Future<core::String> :async_future = new asy::_Future::•<core::String>(); |
| core::bool* :is_sync = false; |
| FutureOr<core::String>? :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 { |
| #L8: |
| { |
| try { |
| throw v; |
| } |
| on core::Object catch(final core::Object _) { |
| } |
| :return_value = let final Never #t5 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:59:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| Future<String> Function(int) y2 = (int v) async /* error */ { |
| ^" in null; |
| break #L8; |
| } |
| 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; |
| }; |
| (core::int) → asy::Future<core::String> y3 = (core::int v) → asy::Future<core::String> /* originally async */ { |
| final asy::_Future<core::String> :async_future = new asy::_Future::•<core::String>(); |
| core::bool* :is_sync = false; |
| FutureOr<core::String>? :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 { |
| #L9: |
| { |
| try { |
| :return_value = throw v; |
| break #L9; |
| } |
| on core::Object catch(final core::Object _) { |
| } |
| :return_value = let final Never #t6 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:64:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| Future<String> Function(int) y3 = (int v) async /* error */ { |
| ^" in null; |
| break #L9; |
| } |
| 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; |
| }; |
| (core::int) → asy::Future<core::String> y5 = (core::int v) → asy::Future<core::String> /* originally async */ { |
| final asy::_Future<core::String> :async_future = new asy::_Future::•<core::String>(); |
| core::bool* :is_sync = false; |
| FutureOr<core::String>? :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 { |
| #L10: |
| { |
| try { |
| self::throwing(); |
| } |
| on core::Object catch(final core::Object _) { |
| } |
| :return_value = let final Never #t7 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:69:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| Future<String> Function(int) y5 = (int v) async /* error */ { |
| ^" in null; |
| break #L10; |
| } |
| 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; |
| }; |
| (core::int) → asy::Future<core::String> y6 = (core::int v) → asy::Future<core::String> /* originally async */ { |
| final asy::_Future<core::String> :async_future = new asy::_Future::•<core::String>(); |
| core::bool* :is_sync = false; |
| FutureOr<core::String>? :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 { |
| #L11: |
| { |
| try { |
| :return_value = self::throwing(); |
| break #L11; |
| } |
| on core::Object catch(final core::Object _) { |
| } |
| :return_value = let final Never #t8 = invalid-expression "pkg/front_end/testcases/nnbd/issue41156.dart:74:37: Error: A non-null value must be returned since the return type 'String' doesn't allow null. |
| Future<String> Function(int) y6 = (int v) async /* error */ { |
| ^" in null; |
| break #L11; |
| } |
| 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; |
| }; |
| } |
| 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; |
| } |