| Index: test/codegen/lib/mirrors/regress_14304_test.dart
|
| diff --git a/test/codegen/language/closure_type_variable_test.dart b/test/codegen/lib/mirrors/regress_14304_test.dart
|
| similarity index 55%
|
| copy from test/codegen/language/closure_type_variable_test.dart
|
| copy to test/codegen/lib/mirrors/regress_14304_test.dart
|
| index 2ed61c27ccfaa6d4cd178ca2e9d408bf55f26c96..af974a40fb5f82d4b7c83a66893d8bfa9d09a69e 100644
|
| --- a/test/codegen/language/closure_type_variable_test.dart
|
| +++ b/test/codegen/lib/mirrors/regress_14304_test.dart
|
| @@ -2,17 +2,19 @@
|
| // 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 the type argument is available inside a closure.
|
| +// Regression test for Issue 14304.
|
|
|
| +import "dart:mirrors";
|
| import "package:expect/expect.dart";
|
|
|
| class A<T> {
|
| - foo() {
|
| - bar() => T;
|
| - return bar();
|
| - }
|
| + T m() {}
|
| }
|
|
|
| main() {
|
| - Expect.equals(new A<int>().foo(), int);
|
| -}
|
| + ClassMirror a = reflectClass(A);
|
| + TypeVariableMirror t = a.typeVariables[0];
|
| + MethodMirror m = a.declarations[#m];
|
| +
|
| + Expect.equals(t, m.returnType);
|
| +}
|
|
|