| Index: test/codegen/lib/mirrors/static_const_field_test.dart
|
| diff --git a/test/codegen/language/cascade_in_initializer_list_test.dart b/test/codegen/lib/mirrors/static_const_field_test.dart
|
| similarity index 52%
|
| copy from test/codegen/language/cascade_in_initializer_list_test.dart
|
| copy to test/codegen/lib/mirrors/static_const_field_test.dart
|
| index 8e7e9ee11e9fa950fa4db917c36c135d5bec357f..f6fd959de34473e068f0c6434d1ab41e24014ab2 100644
|
| --- a/test/codegen/language/cascade_in_initializer_list_test.dart
|
| +++ b/test/codegen/lib/mirrors/static_const_field_test.dart
|
| @@ -2,22 +2,17 @@
|
| // 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.
|
|
|
| +// Test that static const fields are accessible by reflection.
|
| +// Regression test for http://dartbug.com/23811.
|
| +
|
| +@MirrorsUsed(targets: const [A])
|
| +import "dart:mirrors";
|
| import "package:expect/expect.dart";
|
|
|
| class A {
|
| - foo() {}
|
| - bar() {}
|
| -}
|
| -
|
| -class B {
|
| - var x;
|
| - final y;
|
| -
|
| - B(a) : x = a..foo()..bar(), y = a..foo()..bar() {}
|
| + static const ONE = 1;
|
| }
|
|
|
| main() {
|
| - var a = new A(), b = new B(a);
|
| - Expect.equals(a, b.x);
|
| - Expect.equals(a, b.y);
|
| -}
|
| + Expect.equals(1, reflectClass(A).getField(#ONE).reflectee);
|
| +}
|
|
|