OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 // VMOptions=--compile_all |
4 | 5 |
5 class Foo { | 6 class Foo { |
6 var x; | 7 var x; |
7 f() {} | 8 f() {} |
8 | 9 |
9 external var x01; /// 01: compile-time error | 10 external var x01; /// 01: compile-time error |
10 external int x02; /// 02: compile-time error | 11 external int x02; /// 02: compile-time error |
11 | 12 |
12 external f10(); /// 10: runtime error | 13 external f10(); /// 10: runtime error |
13 external f11() { } /// 11: compile-time error | 14 external f11() { } /// 11: compile-time error |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 48 |
48 // Try calling an unpatched external constructor. | 49 // Try calling an unpatched external constructor. |
49 try { /// 20: continued | 50 try { /// 20: continued |
50 var foo = new Foo.n09(); /// 20: continued | 51 var foo = new Foo.n09(); /// 20: continued |
51 } on String catch (exc) { /// 20: continued | 52 } on String catch (exc) { /// 20: continued |
52 if (exc == "External implementation missing.") { /// 20: continued | 53 if (exc == "External implementation missing.") { /// 20: continued |
53 throw exc; /// 20: continued | 54 throw exc; /// 20: continued |
54 } /// 20: continued | 55 } /// 20: continued |
55 } /// 20: continued | 56 } /// 20: continued |
56 } | 57 } |
OLD | NEW |