mirror of
https://github.com/dart-lang/sdk
synced 2024-11-05 18:22:09 +00:00
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:
parent
61b5ba7ecf
commit
222ac2498a
6 changed files with 2 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -578,6 +578,7 @@ class StaticWarningCodeTest_Kernel extends StaticWarningCodeTest_Driver {
|
|||
}
|
||||
|
||||
@override
|
||||
@failingTest
|
||||
test_useOfVoidResult_await() async {
|
||||
return super.test_useOfVoidResult_await();
|
||||
}
|
||||
|
|
|
@ -4923,7 +4923,7 @@ main() async {
|
|||
await x;
|
||||
}''');
|
||||
await computeAnalysisResult(source);
|
||||
assertErrors(source, [StaticWarningCode.USE_OF_VOID_RESULT]);
|
||||
assertNoErrors(source);
|
||||
verify([source]);
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue