| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 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 | 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. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 // Dart test to check that catch clause specifies a type. | 4 // Dart test to check that catch clause specifies a type. |
| 5 | 5 |
| 6 | 6 |
| 7 class TryCatch10NegativeTest { | 7 class TryCatch10NegativeTest { |
| 8 static void testMain() { | 8 static void testMain() { |
| 9 try { | 9 try { |
| 10 throw "Hello"; | 10 throw "Hello"; |
| 11 } catch (e) { // Need final, var or type. | 11 } catch (e) { // Need final, var or type. |
| 12 Expec.equals(true, false); | 12 Expect.equals(true, false); |
| 13 } | 13 } |
| 14 } | 14 } |
| 15 } | 15 } |
| 16 | 16 |
| 17 main() { | 17 main() { |
| 18 TryCatch10NegativeTest.testMain(); | 18 TryCatch10NegativeTest.testMain(); |
| 19 } | 19 } |
| OLD | NEW |