OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | |
2 // for details. All rights reserved. Use of this source code is governed by a | |
3 // BSD-style license that can be found in the LICENSE file. | |
4 // Dart test program for testing throw statement | |
5 | |
6 main() { | |
7 int i = 0; | |
8 try { | |
9 i = 1; | |
10 } catch (exception) { | |
11 i = 2; | |
12 } | |
13 // Since there is a generic 'catch all' statement preceding this | |
14 // we expect to get a dead code error/warning over here. | |
15 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
| |
16 } | |
OLD | NEW |