Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(311)

Unified Diff: tests/language/regress_20074_test.dart

Issue 437813003: Add regression test for issue 20074. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix comments. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/language/language_analyzer2.status ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
+}
« no previous file with comments | « tests/language/language_analyzer2.status ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698