Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(936)

Unified Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 2744043002: Improve recovery in argument lists when missing a comma before a named argument (issue 29005) (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 52faa8f515cb9fc67b56ba9c0bb3033661dc3fe8..80cb7da102840579605ecc94dba80fbbfafefb72 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -9156,6 +9156,14 @@ class C<K {
parseExpression("f(x: 1 y: 2)", [ParserErrorCode.EXPECTED_TOKEN]);
}
+ void test_missingComma_beforeNamedArgument() {
+ createParser('(a b: c)');
+ ArgumentList argumentList = parser.parseArgumentList();
+ expectNotNullIfNoErrors(argumentList);
+ listener.assertErrorsWithCodes([ParserErrorCode.EXPECTED_TOKEN]);
+ expect(argumentList.arguments, hasLength(2));
+ }
+
void test_missingGet() {
CompilationUnit unit = parseCompilationUnit(
r'''
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698