| Index: pkg/analyzer/test/generated/parser_test.dart
|
| diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
|
| index 5d304c70e61c4ea5fda64245c93b2b921b85c821..02bfe592d3e71f32ec03bdb9eb3dd2f29c069b1b 100644
|
| --- a/pkg/analyzer/test/generated/parser_test.dart
|
| +++ b/pkg/analyzer/test/generated/parser_test.dart
|
| @@ -939,14 +939,35 @@ class ErrorParserTest extends ParserTestCase {
|
|
|
| void test_enableAsync_false_1() {
|
| parseAsync = false;
|
| - parse4("parseFunctionDeclarationStatement",
|
| - "foo() async {}", [ParserErrorCode.ASYNC_NOT_SUPPORTED]);
|
| + FunctionDeclarationStatement stmt = parse4(
|
| + "parseFunctionDeclarationStatement",
|
| + "foo() async {}",
|
| + [ParserErrorCode.ASYNC_NOT_SUPPORTED]);
|
| + FunctionExpression expr = stmt.functionDeclaration.functionExpression;
|
| + expect(expr.body.isAsynchronous, isTrue);
|
| + expect(expr.body.isGenerator, isFalse);
|
| }
|
|
|
| void test_enableAsync_false_2() {
|
| parseAsync = false;
|
| - parse4("parseFunctionDeclarationStatement",
|
| - "foo() sync* {}", [ParserErrorCode.ASYNC_NOT_SUPPORTED]);
|
| + FunctionDeclarationStatement stmt = parse4(
|
| + "parseFunctionDeclarationStatement",
|
| + "foo() async => 0;",
|
| + [ParserErrorCode.ASYNC_NOT_SUPPORTED]);
|
| + FunctionExpression expr = stmt.functionDeclaration.functionExpression;
|
| + expect(expr.body.isAsynchronous, isTrue);
|
| + expect(expr.body.isGenerator, isFalse);
|
| + }
|
| +
|
| + void test_enableAsync_false_3() {
|
| + parseAsync = false;
|
| + FunctionDeclarationStatement stmt = parse4(
|
| + "parseFunctionDeclarationStatement",
|
| + "foo() sync* {}",
|
| + [ParserErrorCode.ASYNC_NOT_SUPPORTED]);
|
| + FunctionExpression expr = stmt.functionDeclaration.functionExpression;
|
| + expect(expr.body.isAsynchronous, isFalse);
|
| + expect(expr.body.isGenerator, isTrue);
|
| }
|
|
|
| void test_emptyEnumBody() {
|
|
|