Index: tests/language/throw7_test.dart |
diff --git a/tests/language/throw7_test.dart b/tests/language/throw7_test.dart |
new file mode 100644 |
index 0000000000000000000000000000000000000000..daa5655115362ac0d7f735a308698322855c4bfe |
--- /dev/null |
+++ b/tests/language/throw7_test.dart |
@@ -0,0 +1,16 @@ |
+// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
+// 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. |
+// Dart test program for testing throw statement |
+ |
+main() { |
+ int i = 0; |
+ try { |
+ i = 1; |
+ } catch (exception) { |
+ i = 2; |
+ } |
+ // Since there is a generic 'catch all' statement preceding this |
+ // we expect to get a dead code error/warning over here. |
+ on Exception catch (exception) { i = 3; } /// 01: compile-time error |
kustermann
2013/09/04 11:13:01
Does the analyzer give a warning here as well?
Søren Gjesse
2013/09/04 12:58:52
Currently it just accepts it, issue 12159.
kustermann
2013/09/04 13:03:06
If this *should* result in a warning, you should c
|
+} |