OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 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.md file. | 3 // BSD-style license that can be found in the LICENSE.md file. |
4 | 4 |
5 main() { | 5 main() { |
6 switch (1) { | 6 switch (1) { |
7 case 1: | 7 case 1: |
8 { | 8 { |
9 "No fall-through error needed."; | 9 "No fall-through error needed."; |
10 break; | 10 break; |
(...skipping 20 matching lines...) Expand all Loading... |
31 } | 31 } |
32 case 5: | 32 case 5: |
33 try { | 33 try { |
34 "Fall-through error needed."; | 34 "Fall-through error needed."; |
35 } finally { | 35 } finally { |
36 } | 36 } |
37 case 10000: | 37 case 10000: |
38 "Should be last. No fall-through error, falling through allowed here."; | 38 "Should be last. No fall-through error, falling through allowed here."; |
39 } | 39 } |
40 } | 40 } |
OLD | NEW |