| Index: tests/lib/mirrors/invocation_cache_test.dart
|
| diff --git a/tests/compiler/dart2js_extra/closure_type_reflection2_test.dart b/tests/lib/mirrors/invocation_cache_test.dart
|
| similarity index 51%
|
| copy from tests/compiler/dart2js_extra/closure_type_reflection2_test.dart
|
| copy to tests/lib/mirrors/invocation_cache_test.dart
|
| index ef97222c9cf6f7a9174e9611cec9e8470f93b247..0d9624a8327b42bb4e049a388b92e7177291bf17 100644
|
| --- a/tests/compiler/dart2js_extra/closure_type_reflection2_test.dart
|
| +++ b/tests/lib/mirrors/invocation_cache_test.dart
|
| @@ -2,21 +2,18 @@
|
| // 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 classes referenced from a signature of a tear-off closure
|
| -// are emitted.
|
| -
|
| -@MirrorsUsed(targets: 'C')
|
| +@MirrorsUsed(targets: const ["A"])
|
| import 'dart:mirrors';
|
|
|
| import 'package:expect/expect.dart';
|
|
|
| -class A {}
|
| -
|
| -class C {
|
| - A foo() {}
|
| +class A {
|
| + toString() => "A";
|
| }
|
|
|
| main() {
|
| - Expect.isFalse(reflect(new C().foo).function.returnType.toString()
|
| - .contains('dynamic'));
|
| + // The invocation cache must not find the 'toString' from JavaScript's
|
| + // Object.prototype.
|
| + var toString = reflect(new A()).getField(#toString).reflectee;
|
| + Expect.equals("A", Function.apply(toString, [], {}));
|
| }
|
|
|