Skip to content

Commit 8b56814

Browse files
pqCommit Queue
authored and
Commit Queue
committed
augmented enum camel_case_types test case
I think this should ultimately be supported: https://github.com/dart-lang/language/blob/main/working/augmentation-libraries/feature-specification.md#augmenting-enum-values See also: https://github.com/dart-lang/linter/issues/4881 Change-Id: Ibb8a175b40410599a28f06b2993ce9da92c1838c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352995 Commit-Queue: Phil Quitslund <[email protected]> Reviewed-by: Brian Wilkerson <[email protected]>
1 parent e823249 commit 8b56814

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

pkg/linter/test/rules/camel_case_types_test.dart

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,28 @@ augment class a { }
3131
''');
3232
}
3333

34+
@FailingTest(
35+
issue: 'https://github.com/dart-lang/linter/issues/4881',
36+
reason:
37+
"ParserErrorCode.EXTRANEOUS_MODIFIER [27, 7, Can't have modifier 'augment' here.]")
38+
test_augmentationEnum_lowerCase() async {
39+
newFile('$testPackageLibPath/a.dart', r'''
40+
import augment 'test.dart';
41+
42+
enum e {
43+
a;
44+
}
45+
''');
46+
47+
await assertNoDiagnostics(r'''
48+
library augment 'a.dart';
49+
50+
augment enum e {
51+
augment b;
52+
}
53+
''');
54+
}
55+
3456
test_extensionType_lowerCase() async {
3557
// No need to test all the variations. Name checking is shared with other
3658
// declaration types.

0 commit comments

Comments
 (0)