blob: 1d67b452a5685b46c34738d73749aa4b18995e12 [file] [log] [blame]
library test;
import self as self;
import "dart:async" as asy;
import "dart:core" as core;
static method main() dynamic /* originally async */ {
final asy::Completer<dynamic> :completer = asy::Completer::sync<dynamic>();
asy::FutureOr<dynamic> :return_value;
dynamic :async_stack_trace;
dynamic :async_op_then;
dynamic :async_op_error;
dynamic :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:
{
() asy::Stream<core::Null> f = () asy::Stream<core::Null> /* originally async* */ {
asy::_AsyncStarStreamController<core::Null> :controller;
dynamic :async_stack_trace;
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;
function :async_op([dynamic :result, dynamic :exception, dynamic :stack_trace]) dynamic yielding
try
try {
#L2:
{
if(:controller.{asy::_AsyncStarStreamController::add}(null))
return null;
else
[yield] null;
}
return;
}
on dynamic catch(dynamic :exception, dynamic :stack_trace) {
:controller.{asy::_AsyncStarStreamController::addError}(:exception, :stack_trace);
}
finally {
:controller.{asy::_AsyncStarStreamController::close}();
}
:async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
:async_op_then = asy::_asyncThenWrapperHelper(:async_op);
:async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
:controller = new asy::_AsyncStarStreamController::•<core::Null>(:async_op);
return :controller.{asy::_AsyncStarStreamController::stream};
};
asy::Stream<dynamic> y = f.call();
asy::Stream<core::String> z = f.call();
[yield] let dynamic #t1 = asy::_awaitHelper(f.call().{asy::Stream::first}, :async_op_then, :async_op_error, :async_op) in null;
core::String s = :result;
}
:completer.{asy::Completer::complete}(:return_value);
return;
}
on dynamic catch(dynamic :exception, dynamic :stack_trace) {
:completer.{asy::Completer::completeError}(:exception, :stack_trace);
}
:async_stack_trace = asy::_asyncStackTraceHelper(:async_op);
:async_op_then = asy::_asyncThenWrapperHelper(:async_op);
:async_op_error = asy::_asyncErrorWrapperHelper(:async_op);
asy::Future::microtask<dynamic>(:async_op);
return :completer.{asy::Completer::future};
}