| Index: tests/language_2/generic_methods_generic_function_result_test.dart
|
| diff --git a/tests/language_2/generic_methods_generic_function_result_test.dart b/tests/language_2/generic_methods_generic_function_result_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..369afb89df67dd1d568564924c828d537c459090
|
| --- /dev/null
|
| +++ b/tests/language_2/generic_methods_generic_function_result_test.dart
|
| @@ -0,0 +1,22 @@
|
| +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
|
| +// 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.
|
| +//
|
| +// VMOptions=--generic-method-syntax,--error-on-bad-type
|
| +
|
| +// Verify that function type parameter S can be resolved in bar.
|
| +
|
| +import "package:expect/expect.dart";
|
| +
|
| +T foo<T extends num>(int i, T t) => i + t;
|
| +
|
| +List<T Function<T extends num>(S, T)> bar<S extends num>() {
|
| + return <T Function<T extends num>(S, T)>[foo, foo];
|
| +}
|
| +
|
| +void main() {
|
| + var list = bar<int>();
|
| + print(list[0]
|
| + .runtimeType); // "(int, int) => int" when reifying generic functions.
|
| + Expect.equals(123, list[1]<int>(100, 23));
|
| +}
|
|
|