Chromium Code Reviews| Index: tests/lib/mirrors/unused_mirrors5_test.dart |
| diff --git a/tests/lib/mirrors/unused_mirrors5_test.dart b/tests/lib/mirrors/unused_mirrors5_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..89d2466f5b17bc18abda7eb6c154fec4b315992d |
| --- /dev/null |
| +++ b/tests/lib/mirrors/unused_mirrors5_test.dart |
| @@ -0,0 +1,23 @@ |
| +// Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
|
Johnni Winther
2014/01/30 11:47:18
This test looks identical to unused_mirrors2_test.
floitsch
2014/01/30 12:27:23
It has a getter instead of a top-level field.
|
| +// 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. |
| + |
| +library lib; |
| + |
| +@MirrorsUsed(targets: const ["lib"]) |
| +import 'dart:mirrors'; |
| + |
| +Bar get foo => new Bar(); |
| + |
| +typedef int FunctionTypeDef(); |
| + |
| +class Bar { |
| + final FunctionTypeDef gee; |
| +} |
| + |
| +main() { |
| + // Don't do anything. |
| +} |