Revert "Fix #33415 no error for awaiting a void expression."

This reverts commit 9727a4a4ef.

Reason for revert: Internal breakage; needs to be landed behind a flag.

Original change's description:
> Fix #33415 no error for awaiting a void expression.
>
> Bug:  33415
> Change-Id: I4d4e81fef79a5bc5162e37ab07a8fe99e50c8dfc
> Reviewed-on: https://dart-review.googlesource.com/60522
> Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
> Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>

TBR=brianwilkerson@google.com,mfairhurst@google.com


Bug: 33415
Change-Id: I66e1bc58bc0966a2348804dbdef6f5901b6aaf55
Reviewed-on: https://dart-review.googlesource.com/67100
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This commit is contained in:
Mike Fairhurst 2018-08-17 23:48:46 +00:00
parent 61b5ba7ecf
commit 222ac2498a
6 changed files with 2 additions and 5 deletions

View file

@ -397,7 +397,6 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
_errorReporter.reportErrorForToken(
CompileTimeErrorCode.AWAIT_IN_WRONG_CONTEXT, node.awaitKeyword);
}
_checkForUseOfVoidResult(node.expression);
return super.visitAwaitExpression(node);
}

View file

@ -578,6 +578,7 @@ class StaticWarningCodeTest_Kernel extends StaticWarningCodeTest_Driver {
}
@override
@failingTest
test_useOfVoidResult_await() async {
return super.test_useOfVoidResult_await();
}

View file

@ -4923,7 +4923,7 @@ main() async {
await x;
}''');
await computeAnalysisResult(source);
assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
assertNoErrors(source);
verify([source]);
}

View file

@ -124,4 +124,3 @@ LanguageFeatures/Super-bounded-types/static_analysis_A01_t06: CompileTimeError #
LanguageFeatures/Super-bounded-types/static_analysis_A01_t07: CompileTimeError # Issue 32903
LanguageFeatures/Super-bounded-types/static_analysis_A01_t08: CompileTimeError # Issue 32903
LanguageFeatures/Super-bounded-types/static_analysis_A01_t09: CompileTimeError # Issue 32903

View file

@ -595,7 +595,6 @@ vm/regress_33469_test/02: Crash # http://dartbug.com/33481
vm/regress_33469_test/03: MissingCompileTimeError # http://dartbug.com/33481
void/generalized_void_syntax_test: CompileTimeError # https://github.com/dart-lang/sdk/issues/30177
void/void_type_function_types_test/none: CompileTimeError # Issue 30177
void/void_type_usage_test/async_use_in_await: CompileTimeError # https://github.com/dart-lang/sdk/issues/30177
void/void_type_usage_test/async_use_in_yield: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/30177
void/void_type_usage_test/async_use_in_yield_star: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/30177
void/void_type_usage_test/call_boolean_and_right: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/30177

View file

@ -195,7 +195,6 @@ type_promotion_functions_test/none: CompileTimeError # Issue 30895
type_variable_scope_test/none: CompileTimeError
void/generalized_void_syntax_test: CompileTimeError # https://github.com/dart-lang/sdk/issues/30177
void/void_type_function_types_test/none: CompileTimeError # Issue 30177
void/void_type_usage_test/async_use_in_await: CompileTimeError # https://github.com/dart-lang/sdk/issues/30177
void/void_type_usage_test/async_use_in_yield: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/30177
void/void_type_usage_test/async_use_in_yield_star: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/30177
void/void_type_usage_test/call_boolean_and_right: MissingCompileTimeError # https://github.com/dart-lang/sdk/issues/30177