blob: d13756d1f3416729a73738988a31de7229816d41 [file] [log] [blame]
library test;
import self as self;
import "dart:async" as asy;
import "dart:core" as core;
static method test() dynamic {
() asy::Stream<core::num> f = () asy::Stream<core::num> /* originally async* */ {
asy::_AsyncStarStreamController<core::num> :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 {
#L1:
{
if(:controller.{asy::_AsyncStarStreamController::add}(1))
return null;
else
[yield] null;
asy::Stream<core::double> s;
if(:controller.{asy::_AsyncStarStreamController::addStream}(s))
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::num>(:async_op);
return :controller.{asy::_AsyncStarStreamController::stream};
};
asy::Stream<core::num> g = f.call();
asy::Stream<core::int> h = f.call() as{TypeError} asy::Stream<core::int>;
}
static method main() dynamic {}