| Index: pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| diff --git a/pkg/analyzer/test/generated/compile_time_error_code_test.dart b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| index 743399e0a9a458a8df5142dfc746d3127cdc64f5..851a4ee69047ad753d280cbedd668fa751bf81b3 100644
|
| --- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| @@ -222,6 +222,46 @@ class N {}''');
|
| verify([source]);
|
| }
|
|
|
| + void test_annotationWithNotClass() {
|
| + Source source = addSource('''
|
| +class Property {
|
| + final int value;
|
| + const Property(this.value);
|
| +}
|
| +
|
| +const Property property = const Property(42);
|
| +
|
| +@property(123)
|
| +main() {
|
| +}
|
| +''');
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(source, [CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS]);
|
| + verify([source]);
|
| + }
|
| +
|
| + void test_annotationWithNotClass_prefixed() {
|
| + addNamedSource(
|
| + "/annotations.dart",
|
| + r'''
|
| +class Property {
|
| + final int value;
|
| + const Property(this.value);
|
| +}
|
| +
|
| +const Property property = const Property(42);
|
| +''');
|
| + Source source = addSource('''
|
| +import 'annotations.dart' as pref;
|
| +@pref.property(123)
|
| +main() {
|
| +}
|
| +''');
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(source, [CompileTimeErrorCode.ANNOTATION_WITH_NON_CLASS]);
|
| + verify([source]);
|
| + }
|
| +
|
| void test_async_used_as_identifier_in_annotation() {
|
| Source source = addSource('''
|
| const int async = 0;
|
|
|