| Index: tests/language/regress_20074_test.dart
|
| diff --git a/tests/language/switch_case_static_const_test.dart b/tests/language/regress_20074_test.dart
|
| similarity index 54%
|
| copy from tests/language/switch_case_static_const_test.dart
|
| copy to tests/language/regress_20074_test.dart
|
| index e15a9f46fc89414b7acb23506f4c2687cccfa36e..9b11db0e7a06f65f732692667a594dbb04dce07f 100644
|
| --- a/tests/language/switch_case_static_const_test.dart
|
| +++ b/tests/language/regress_20074_test.dart
|
| @@ -2,23 +2,16 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| -class A {
|
| - static const S = 'A.S';
|
| -}
|
| -
|
| -const S = 'S';
|
| +// Regression test for issue 20074. Check that a parameter is not declared
|
| +// in the same scope as its function declaration.
|
|
|
| -foo(var p) {
|
| - switch (p) {
|
| - case S:
|
| - break;
|
| - case A.S:
|
| - break;
|
| - case 'abc':
|
| - break;
|
| +doit() {
|
| + error(error) {
|
| + print(error);
|
| }
|
| + error('foobar');
|
| }
|
|
|
| main() {
|
| - foo('p');
|
| -}
|
| + doit();
|
| +}
|
|
|