| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 // Regression test for a bug that was caused by uninstantiated classes being | 5 // Regression test for a bug that was caused by uninstantiated classes being |
| 6 // added to emitted classes by runtime-type system. | 6 // added to emitted classes by runtime-type system. |
| 7 // See my explanation in https://codereview.chromium.org/14018036/. | 7 // See my explanation in https://codereview.chromium.org/14018036/. |
| 8 // -- ahe | 8 // -- ahe |
| 9 | 9 |
| 10 class A native "A" { | 10 import "dart:_js_helper"; |
| 11 |
| 12 @Native("A") |
| 13 class A { |
| 11 // Just making sure the field name is unique. | 14 // Just making sure the field name is unique. |
| 12 var rti_only_native_test_field; | 15 var rti_only_native_test_field; |
| 13 } | 16 } |
| 14 | 17 |
| 15 typedef fisk(); | 18 typedef fisk(); |
| 16 | 19 |
| 17 main() { | 20 main() { |
| 18 void foo(A x) {} | 21 void foo(A x) {} |
| 19 var map = { 'a': 0, 'b': main }; | 22 var map = { 'a': 0, 'b': main }; |
| 20 try { | 23 try { |
| 21 map.values.forEach((x) => x.rti_only_native_test_field); | 24 map.values.forEach((x) => x.rti_only_native_test_field); |
| 22 } finally { | 25 } finally { |
| 23 print(main is fisk); | 26 print(main is fisk); |
| 24 return; | 27 return; |
| 25 } | 28 } |
| 26 } | 29 } |
| OLD | NEW |