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