mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 22:31:50 +00:00
[vm/kernel/async] Use proper type argument when createing async* controller.
Change-Id: I40e5d2d933b83a24c9d8177437fb6df1f21b5cc1 Reviewed-on: https://dart-review.googlesource.com/34741 Reviewed-by: Martin Kustermann <kustermann@google.com>
This commit is contained in:
parent
97898a9bb6
commit
ff008ca37a
|
@ -760,17 +760,20 @@ class AsyncStarFunctionRewriter extends AsyncRewriterBase {
|
||||||
FunctionNode rewrite() {
|
FunctionNode rewrite() {
|
||||||
var statements = <Statement>[];
|
var statements = <Statement>[];
|
||||||
|
|
||||||
// _AsyncStarStreamController :controller;
|
final elementType = elementTypeFromReturnType(helper.streamClass);
|
||||||
|
|
||||||
|
// _AsyncStarStreamController<T> :controller;
|
||||||
controllerVariable = new VariableDeclaration(":controller",
|
controllerVariable = new VariableDeclaration(":controller",
|
||||||
type: new InterfaceType(helper.asyncStarStreamControllerClass,
|
type: new InterfaceType(
|
||||||
[elementTypeFromReturnType(helper.streamClass)]));
|
helper.asyncStarStreamControllerClass, [elementType]));
|
||||||
statements.add(controllerVariable);
|
statements.add(controllerVariable);
|
||||||
|
|
||||||
setupAsyncContinuations(statements);
|
setupAsyncContinuations(statements);
|
||||||
|
|
||||||
// :controller = new _AsyncStarStreamController(:async_op);
|
// :controller = new _AsyncStarStreamController<T>(:async_op);
|
||||||
var arguments =
|
var arguments = new Arguments(
|
||||||
new Arguments(<Expression>[new VariableGet(nestedClosureVariable)]);
|
<Expression>[new VariableGet(nestedClosureVariable)],
|
||||||
|
types: [elementType]);
|
||||||
var buildController = new ConstructorInvocation(
|
var buildController = new ConstructorInvocation(
|
||||||
helper.asyncStarStreamControllerConstructor, arguments)
|
helper.asyncStarStreamControllerConstructor, arguments)
|
||||||
..fileOffset = enclosingFunction.fileOffset;
|
..fileOffset = enclosingFunction.fileOffset;
|
||||||
|
|
|
@ -85,11 +85,6 @@ async_return_types_test/nestedFuture: Fail
|
||||||
async_return_types_test/none: RuntimeError
|
async_return_types_test/none: RuntimeError
|
||||||
async_star_regression_2238_test: RuntimeError
|
async_star_regression_2238_test: RuntimeError
|
||||||
async_star_take_reyield_test: RuntimeError
|
async_star_take_reyield_test: RuntimeError
|
||||||
async_star_test/01: RuntimeError
|
|
||||||
async_star_test/03: RuntimeError
|
|
||||||
async_star_test/04: RuntimeError
|
|
||||||
async_star_test/05: RuntimeError
|
|
||||||
async_star_test/none: RuntimeError
|
|
||||||
asyncstar_yield_test: RuntimeError
|
asyncstar_yield_test: RuntimeError
|
||||||
asyncstar_yieldstar_test: RuntimeError
|
asyncstar_yieldstar_test: RuntimeError
|
||||||
bug31436_test: RuntimeError
|
bug31436_test: RuntimeError
|
||||||
|
@ -234,18 +229,7 @@ async_return_types_test/tooManyTypeParameters: MissingCompileTimeError
|
||||||
async_return_types_test/wrongReturnType: MissingCompileTimeError
|
async_return_types_test/wrongReturnType: MissingCompileTimeError
|
||||||
async_star_cancel_while_paused_test: RuntimeError
|
async_star_cancel_while_paused_test: RuntimeError
|
||||||
async_star_pause_test: Fail, OK
|
async_star_pause_test: Fail, OK
|
||||||
async_star_regression_2238_test: RuntimeError
|
|
||||||
async_star_regression_23116_test: RuntimeError
|
|
||||||
async_star_regression_fisk_test: RuntimeError
|
|
||||||
async_star_test/01: CompileTimeError # Issue 2238.
|
|
||||||
async_star_test/01: Pass
|
|
||||||
async_star_test/01: RuntimeError
|
|
||||||
async_star_test/02: RuntimeError # Issue 31402 (Invocation arguments)
|
async_star_test/02: RuntimeError # Issue 31402 (Invocation arguments)
|
||||||
async_star_test/03: RuntimeError # Issue 31402 (Invocation arguments)
|
|
||||||
async_star_test/04: RuntimeError # Issue 31402 (Invocation arguments)
|
|
||||||
async_star_test/05: RuntimeError # Issue 31402 (Invocation arguments)
|
|
||||||
async_star_test/none: RuntimeError # Issue 31402 (Invocation arguments)
|
|
||||||
await_test: RuntimeError # Issue 31541
|
|
||||||
bad_named_parameters2_test/01: MissingCompileTimeError
|
bad_named_parameters2_test/01: MissingCompileTimeError
|
||||||
bad_named_parameters_test/01: MissingCompileTimeError
|
bad_named_parameters_test/01: MissingCompileTimeError
|
||||||
bad_named_parameters_test/02: MissingCompileTimeError
|
bad_named_parameters_test/02: MissingCompileTimeError
|
||||||
|
@ -455,7 +439,6 @@ function_type_alias4_test: RuntimeError
|
||||||
function_type_alias6_test/none: RuntimeError
|
function_type_alias6_test/none: RuntimeError
|
||||||
function_type_alias_test: RuntimeError
|
function_type_alias_test: RuntimeError
|
||||||
generalized_void_syntax_test: CompileTimeError # Issue #30176.
|
generalized_void_syntax_test: CompileTimeError # Issue #30176.
|
||||||
generic_async_star_test: RuntimeError
|
|
||||||
generic_closure_test: RuntimeError
|
generic_closure_test: RuntimeError
|
||||||
generic_function_bounds_test: RuntimeError
|
generic_function_bounds_test: RuntimeError
|
||||||
generic_function_bounds_test: CompileTimeError
|
generic_function_bounds_test: CompileTimeError
|
||||||
|
@ -987,10 +970,6 @@ type_variable_bounds4_test/01: RuntimeError
|
||||||
[ $compiler == dartkp && $runtime == dart_precompiled && !$checked && $strong ]
|
[ $compiler == dartkp && $runtime == dart_precompiled && !$checked && $strong ]
|
||||||
assertion_initializer_const_error_test/01: MissingCompileTimeError
|
assertion_initializer_const_error_test/01: MissingCompileTimeError
|
||||||
assertion_initializer_const_function_error_test/01: MissingCompileTimeError
|
assertion_initializer_const_function_error_test/01: MissingCompileTimeError
|
||||||
async_star_test/01: RuntimeError
|
|
||||||
async_star_test/03: RuntimeError
|
|
||||||
async_star_test/05: RuntimeError
|
|
||||||
async_star_test/none: RuntimeError
|
|
||||||
bool_check_test: RuntimeError
|
bool_check_test: RuntimeError
|
||||||
bool_condition_check_test: RuntimeError
|
bool_condition_check_test: RuntimeError
|
||||||
callable_test/none: RuntimeError
|
callable_test/none: RuntimeError
|
||||||
|
@ -1055,13 +1034,7 @@ async_return_types_test/tooManyTypeParameters: MissingCompileTimeError
|
||||||
async_return_types_test/wrongReturnType: MissingCompileTimeError
|
async_return_types_test/wrongReturnType: MissingCompileTimeError
|
||||||
async_star_cancel_while_paused_test: RuntimeError
|
async_star_cancel_while_paused_test: RuntimeError
|
||||||
async_star_pause_test: Fail, OK
|
async_star_pause_test: Fail, OK
|
||||||
async_star_regression_2238_test: RuntimeError
|
async_star_test/02: RuntimeError, CompileTimeError # Issue 31402 (Invocation arguments)
|
||||||
async_star_regression_23116_test: RuntimeError
|
|
||||||
async_star_regression_fisk_test: RuntimeError
|
|
||||||
async_star_test/02: CompileTimeError # Issue 31402 (Invocation arguments)
|
|
||||||
async_star_test/02: RuntimeError
|
|
||||||
async_star_test/04: RuntimeError
|
|
||||||
await_test: RuntimeError # Issue 31541
|
|
||||||
bad_named_parameters2_test/01: MissingCompileTimeError
|
bad_named_parameters2_test/01: MissingCompileTimeError
|
||||||
bad_named_parameters_test/01: MissingCompileTimeError
|
bad_named_parameters_test/01: MissingCompileTimeError
|
||||||
bad_named_parameters_test/02: MissingCompileTimeError
|
bad_named_parameters_test/02: MissingCompileTimeError
|
||||||
|
@ -1277,7 +1250,6 @@ function_type_alias4_test: RuntimeError
|
||||||
function_type_alias6_test/none: RuntimeError
|
function_type_alias6_test/none: RuntimeError
|
||||||
function_type_alias_test: RuntimeError
|
function_type_alias_test: RuntimeError
|
||||||
generalized_void_syntax_test: CompileTimeError # Issue #30176
|
generalized_void_syntax_test: CompileTimeError # Issue #30176
|
||||||
generic_async_star_test: RuntimeError
|
|
||||||
generic_closure_test: RuntimeError
|
generic_closure_test: RuntimeError
|
||||||
generic_function_bounds_test: CompileTimeError
|
generic_function_bounds_test: CompileTimeError
|
||||||
generic_function_dcall_test: RuntimeError
|
generic_function_dcall_test: RuntimeError
|
||||||
|
|
Loading…
Reference in a new issue