| Index: dart/type_variable_function_type_test.dart
|
| diff --git a/dart/type_variable_function_type_test.dart b/dart/type_variable_function_type_test.dart
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..a832fd80f1e74b27e1edb45ccf7f9aee9ba8d833
|
| --- /dev/null
|
| +++ b/dart/type_variable_function_type_test.dart
|
| @@ -0,0 +1,19 @@
|
| +typedef T Func<T>();
|
| +
|
| +class Foo<S> {
|
| + m(x) => x is Func<S>;
|
| +}
|
| +
|
| +class Bar<T> {
|
| + f() {
|
| + T local() {}
|
| + return local;
|
| + }
|
| +}
|
| +
|
| +void main() {
|
| + var x = new Foo<List<String>>();
|
| + if (new DateTime.now().millisecondsSinceEpoch == 42) x = new Foo<int>();
|
| + print(x.m(new Bar<String>().f()));
|
| + print(x.m(new Bar<List<String>>().f()));
|
| +}
|
|
|