| 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 @JS() | 5 @JS() |
| 6 library js_typed_interop_anonymous_unreachable_test; | 6 library js_typed_interop_anonymous_unreachable_test; |
| 7 | 7 |
| 8 import 'dart:html'; | 8 import 'dart:html'; |
| 9 import 'dart:js' as js; | 9 import 'dart:js' as js; |
| 10 | 10 |
| 11 import 'package:js/js.dart'; | 11 import 'package:js/js.dart'; |
| 12 import 'package:unittest/unittest.dart'; | 12 import 'package:unittest/unittest.dart'; |
| 13 import 'package:unittest/html_config.dart'; | 13 import 'package:unittest/html_config.dart'; |
| 14 | 14 |
| 15 @JS() | 15 @JS() |
| 16 @anonymous | 16 @anonymous |
| 17 class Literal { | 17 class Literal { |
| 18 external factory Literal({int x, String y, num z}); | 18 external factory Literal({int x, String y, num z}); |
| 19 | 19 |
| 20 external int get x; | 20 external int get x; |
| 21 external String get y; | 21 external String get y; |
| 22 external num get z; | 22 external num get z; |
| 23 } | 23 } |
| 24 | 24 |
| 25 main() { | 25 main() { |
| 26 useHtmlConfiguration(); | 26 useHtmlConfiguration(); |
| 27 test('nothing to do', () { | 27 test('nothing to do', () { |
| 28 // This test is empty, but it is a regression for Issue# 24974: dartjs | 28 // This test is empty, but it is a regression for Issue# 24974: dart2js |
| 29 // would crash trying to compile code that used @anonymous and that was | 29 // would crash trying to compile code that used @anonymous and that was |
| 30 // not reachable from main. | 30 // not reachable from main. |
| 31 }); | 31 }); |
| 32 } | 32 } |
| OLD | NEW |