c191551fac
TEST=Covered by existing tests. Change-Id: Ied8be1874164e68e0a3a48e1b2f9a33310071381 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/183009 Commit-Queue: Dmitry Stefantsov <dmitryas@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
50 lines
2.1 KiB
Plaintext
50 lines
2.1 KiB
Plaintext
library /*isNonNullableByDefault*/;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List<dynamic>?' can't be assigned to a variable of type 'List<dynamic>' because 'List<dynamic>?' is nullable and 'List<dynamic>' isn't.
|
|
// - 'List' is from 'dart:core'.
|
|
// List y = await l(); // should be a List?
|
|
// ^
|
|
//
|
|
import self as self;
|
|
import "dart:async" as asy;
|
|
import "dart:core" as core;
|
|
import "dart:_internal" as _in;
|
|
|
|
static method test() → 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 {
|
|
#L1:
|
|
{
|
|
final Never #t1 = invalid-expression "pkg/front_end/testcases/nnbd/issue41108.dart:6:12: Error: A value of type 'List<dynamic>?' can't be assigned to a variable of type 'List<dynamic>' because 'List<dynamic>?' is nullable and 'List<dynamic>' isn't.
|
|
- 'List' is from 'dart:core'.
|
|
List y = await l(); // should be a List?
|
|
^";
|
|
[yield] let dynamic #t2 = asy::_awaitHelper(self::l(), :async_op_then, :async_op_error, :async_op) in null;
|
|
core::List<dynamic> y = _in::unsafeCast<core::List<dynamic>?>(: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.call();
|
|
:is_sync = true;
|
|
return :async_future;
|
|
}
|
|
static method l() → asy::Future<core::List<dynamic>>?
|
|
return null;
|
|
static method main() → dynamic {}
|