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", |