| 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 import "package:expect/expect.dart"; | 5 import "package:expect/expect.dart"; |
| 6 | 6 |
| 7 // Test that type checks occur on assignment to fields of native methods. | 7 // Test that type checks occur on assignment to fields of native methods. |
| 8 | 8 |
| 9 class A native "*A" { | 9 class A native "A" { |
| 10 int foo; | 10 int foo; |
| 11 } | 11 } |
| 12 | 12 |
| 13 class B native "*B" { | 13 class B native "B" { |
| 14 String foo; | 14 String foo; |
| 15 } | 15 } |
| 16 | 16 |
| 17 A makeA() native { return new A(); } | 17 A makeA() native { return new A(); } |
| 18 B makeB() native { return new B(); } | 18 B makeB() native { return new B(); } |
| 19 | 19 |
| 20 void setup() native """ | 20 void setup() native """ |
| 21 function A() {} | 21 function A() {} |
| 22 | 22 |
| 23 function B() {} | 23 function B() {} |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 | 107 |
| 108 main() { | 108 main() { |
| 109 setup(); | 109 setup(); |
| 110 | 110 |
| 111 if (isCheckedMode()) { | 111 if (isCheckedMode()) { |
| 112 checkedModeTest(); | 112 checkedModeTest(); |
| 113 } else { | 113 } else { |
| 114 uncheckedModeTest(); | 114 uncheckedModeTest(); |
| 115 } | 115 } |
| 116 } | 116 } |
| OLD | NEW |