| Index: tests/lib/mirrors/unused_mirrors2_test.dart
|
| diff --git a/tests/lib/mirrors/parameter_is_const_test.dart b/tests/lib/mirrors/unused_mirrors2_test.dart
|
| similarity index 50%
|
| copy from tests/lib/mirrors/parameter_is_const_test.dart
|
| copy to tests/lib/mirrors/unused_mirrors2_test.dart
|
| index 45185a9b88d15539aa12dbc1f65b2cc2269e7be3..9ce81af122926d2595bb198d096586a285c2d64f 100644
|
| --- a/tests/lib/mirrors/parameter_is_const_test.dart
|
| +++ b/tests/lib/mirrors/unused_mirrors2_test.dart
|
| @@ -2,19 +2,22 @@
|
| // 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.
|
|
|
| -library test.parameter_is_const;
|
| +// Tests that MirrorsUsed without usage of the static field does not crash
|
| +// dart2js.
|
|
|
| +library lib;
|
| +
|
| +@MirrorsUsed(targets: const ["lib"])
|
| import 'dart:mirrors';
|
|
|
| -import 'package:expect/expect.dart';
|
| +Bar foo = new Bar();
|
| +
|
| +typedef int FunctionTypeDef();
|
|
|
| -class Class {
|
| - foo(
|
| - const /// 01: compile-time error
|
| - param) {}
|
| +class Bar {
|
| + final FunctionTypeDef gee;
|
| }
|
|
|
| main() {
|
| - MethodMirror mm = reflectClass(Class).declarations[#foo];
|
| - Expect.isFalse(mm.parameters.single.isConst);
|
| + // Don't do anything.
|
| }
|
|
|