Chromium Code Reviews| Index: tests/lib/mirrors/unused_mirrors6_test.dart |
| diff --git a/tests/lib/mirrors/unused_mirrors6_test.dart b/tests/lib/mirrors/unused_mirrors6_test.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1a41e0503d10015df80abe95fc7063a3ec4a2491 |
| --- /dev/null |
| +++ b/tests/lib/mirrors/unused_mirrors6_test.dart |
| @@ -0,0 +1,25 @@ |
| +// 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_mirrors3_test.
floitsch
2014/01/30 12:27:23
Getter instead of 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 ["C"]) |
| +import 'dart:mirrors'; |
| + |
| +class C { |
| + static Bar get foo => new Bar(); |
| +} |
| + |
| +typedef int FunctionTypeDef(); |
| + |
| +class Bar { |
| + final FunctionTypeDef gee; |
| +} |
| + |
| +main() { |
| + // Don't do anything. |
| +} |