| Index: pkg/analyzer/test/src/summary/summary_common.dart
|
| diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
|
| index a0eb33433eb31df08a4d67979066535230ddf428..e6685d895e7bca9b3c6f0ed942e48dc89015e139 100644
|
| --- a/pkg/analyzer/test/src/summary/summary_common.dart
|
| +++ b/pkg/analyzer/test/src/summary/summary_common.dart
|
| @@ -4749,6 +4749,19 @@ f() { // 1
|
| }
|
| }
|
|
|
| + test_executable_localVariables_catch_noVariables() {
|
| + String code = r'''
|
| +f() {
|
| + try {
|
| + throw 42;
|
| + } on int {}
|
| +}
|
| +''';
|
| + UnlinkedExecutable executable = serializeExecutableText(code);
|
| + List<UnlinkedVariable> variables = executable.localVariables;
|
| + expect(variables, isEmpty);
|
| + }
|
| +
|
| test_executable_localVariables_empty() {
|
| UnlinkedExecutable executable = serializeExecutableText(r'''
|
| f() {
|
| @@ -4798,6 +4811,17 @@ f() { // 1
|
| }
|
| }
|
|
|
| + test_executable_localVariables_forLoop_noVariables() {
|
| + String code = r'''
|
| +f() {
|
| + for (; true;) {}
|
| +}
|
| +''';
|
| + UnlinkedExecutable executable = serializeExecutableText(code);
|
| + List<UnlinkedVariable> variables = executable.localVariables;
|
| + expect(variables, isEmpty);
|
| + }
|
| +
|
| test_executable_localVariables_inConstructor() {
|
| String code = r'''
|
| class C {
|
|
|