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

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

Issue 2700343003: Recover better from illegally named constructors (issue 28807) (Closed)
Patch Set: Created 3 years, 10 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
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 006350f70ff5690b27d75178f8b6c56bd75f2ce1..edc15ef20156f3a42f17f982f801356e716ba7c7 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -1670,6 +1670,13 @@ class Foo {
listener.assertErrorsWithCodes([ParserErrorCode.INVALID_COMMENT_REFERENCE]);
}
+ void test_invalidConstructorName_with() {
+ createParser("C.with();");
+ ClassMember member = parser.parseClassMember('C');
+ expectNotNullIfNoErrors(member);
+ listener.assertErrorsWithCodes([ParserErrorCode.INVALID_CONSTRUCTOR_NAME]);
+ }
+
void test_invalidHexEscape_invalidDigit() {
createParser("'\\x0 a'");
StringLiteral literal = parser.parseStringLiteral();

Powered by Google App Engine
This is Rietveld 408576698