| Index: tests/lib/mirrors/unused_mirrors_test.dart
|
| diff --git a/tests/lib/mirrors/unmangled_type_test.dart b/tests/lib/mirrors/unused_mirrors_test.dart
|
| similarity index 51%
|
| copy from tests/lib/mirrors/unmangled_type_test.dart
|
| copy to tests/lib/mirrors/unused_mirrors_test.dart
|
| index dbc6b62437908677c6fb6c1dab670b8d0dd7d2b6..fcbc08aa56898ea761d80d932707acead9bb2245 100644
|
| --- a/tests/lib/mirrors/unmangled_type_test.dart
|
| +++ b/tests/lib/mirrors/unused_mirrors_test.dart
|
| @@ -2,14 +2,20 @@
|
| // for details. All rights reserved. Use of this source code is governed by a
|
| // BSD-style license that can be found in the LICENSE file.
|
|
|
| +// Tests that MirrorsUsed without usage of the static field does not crash
|
| +// dart2js.
|
| +
|
| +@MirrorsUsed(targets: const ["foo"])
|
| import 'dart:mirrors';
|
|
|
| -import 'package:expect/expect.dart';
|
| +Bar foo = new Bar();
|
| +
|
| +typedef int FunctionTypeDef();
|
|
|
| -class Foo {
|
| +class Bar {
|
| + final FunctionTypeDef gee;
|
| }
|
|
|
| main() {
|
| - Expect.stringEquals('Foo', '${new Foo().runtimeType}');
|
| - Expect.stringEquals('foo', MirrorSystem.getName(new Symbol('foo')));
|
| + // Don't do anything.
|
| }
|
|
|