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

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

Issue 713953002: Fix hurt recovery (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 e466fa9bb415270c82eb54640e2df746e3cad2ca..1b6d7d87fc4ef7830cce1239fd2ad23b9951d9c0 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -2479,6 +2479,22 @@ class B = Object with A {}''', [ParserErrorCode.EXPECTED_TOKEN]);
[ParserErrorCode.MISSING_INITIALIZER]);
}
+ void test_incomplete_constructorInitializers_missingEquals() {
+ ClassMember member = ParserTestCase.parse3(
+ "parseClassMember",
+ ["C"],
+ "C() : x(3) {}",
+ [ParserErrorCode.MISSING_ASSIGNMENT_IN_INITIALIZER]);
+ expect(member, new isInstanceOf<ConstructorDeclaration>());
+ NodeList<ConstructorInitializer> initializers = (member as ConstructorDeclaration).initializers;
+ expect(initializers, hasLength(1));
+ ConstructorInitializer initializer = initializers[0];
+ expect(initializer, new isInstanceOf<ConstructorFieldInitializer>());
+ Expression expression = (initializer as ConstructorFieldInitializer).expression;
+ expect(expression, isNotNull);
+ expect(expression, new isInstanceOf<ParenthesizedExpression>());
+ }
+
void test_incomplete_constructorInitializers_variable() {
ParserTestCase.parse3(
"parseClassMember",
« 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