OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 | 4 |
5 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 import "package:js/js.dart"; |
| 7 |
| 8 class Bar { } |
| 9 |
| 10 @Js() |
| 11 class Foo extends Bar { |
| 12 external get bar; |
| 13 } |
| 14 |
| 15 @Js() |
| 16 class Baz { |
| 17 Baz() {} |
| 18 external get foo; |
| 19 void bar() { } |
| 20 get baz; |
| 21 } |
6 | 22 |
7 void main() { | 23 void main() { |
8 int x = 327680; | 24 /// 01: compile-time error |
9 int r = 65536; | 25 var b = new Bar(); |
10 for (var i = 0; i < 200; i++) { | |
11 Expect.equals(r, x ~/ 5); | |
12 x *= 10; | |
13 r *= 10; | |
14 } | |
15 } | 26 } |
OLD | NEW |