| 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 3f7ac4ec83bd28b514ef310202a7e8aa09b947af..f506339294f0238d2b175fb48cd34fed394a534b 100644
|
| --- a/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| +++ b/pkg/analyzer/test/generated/compile_time_error_code_test.dart
|
| @@ -5675,6 +5675,28 @@ main() {
|
| assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
|
| }
|
|
|
| + void test_referencedBeforeDeclaration_type_localFunction() {
|
| + Source source = addSource(r'''
|
| +void testTypeRef() {
|
| + String s = '';
|
| + int String(int x) => x + 1;
|
| +}
|
| +''');
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
|
| + }
|
| +
|
| + void test_referencedBeforeDeclaration_type_localVariable() {
|
| + Source source = addSource(r'''
|
| +void testTypeRef() {
|
| + String s = '';
|
| + var String = '';
|
| +}
|
| +''');
|
| + computeLibrarySourceErrors(source);
|
| + assertErrors(source, [CompileTimeErrorCode.REFERENCED_BEFORE_DECLARATION]);
|
| + }
|
| +
|
| void test_rethrowOutsideCatch() {
|
| Source source = addSource(r'''
|
| f() {
|
|
|