| 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 | 4 |
| 5 // Additional Dart code may be 'placed on' hidden native classes. | 5 // Additional Dart code may be 'placed on' hidden native classes. |
| 6 | 6 |
| 7 import "package:expect/expect.dart"; | |
| 8 import 'native_metadata.dart'; | 7 import 'native_metadata.dart'; |
| 9 | 8 |
| 10 @Native("*A") | 9 @Native("*A") |
| 11 class A { | 10 class A { |
| 12 | 11 |
| 13 var _field; | 12 var _field; |
| 14 | 13 |
| 15 int get X => _field; | 14 int get X => _field; |
| 16 void set X(int x) { _field = x; } | 15 void set X(int x) { _field = x; } |
| 17 | 16 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 29 | 28 |
| 30 main() { | 29 main() { |
| 31 setup(); | 30 setup(); |
| 32 | 31 |
| 33 var a = makeA(); | 32 var a = makeA(); |
| 34 | 33 |
| 35 a.X = 100; | 34 a.X = 100; |
| 36 Expect.equals(100, a.X); | 35 Expect.equals(100, a.X); |
| 37 Expect.equals(150, a.method(50)); | 36 Expect.equals(150, a.method(50)); |
| 38 } | 37 } |
| OLD | NEW |