Chromium Code Reviews| 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 | |
| 16 } | |
| OLD | NEW |