dart-sdk/tests/language/generic/function_subtype_runtime_2_test.dart
Robert Nystrom 2bf3259005 Migrate language_2/generic to NNBD.
Change-Id: I582fa00eb713282c3bd6fc1607efc0242ce9076f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/146686
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
2020-05-13 01:00:35 +00:00

25 lines
602 B
Dart

// TODO(multitest): This was automatically migrated from a multitest and may
// contain strange or dead code.
// Copyright (c) 2018, 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.
// Simple test of the subtype relationship on generic function types.
typedef F1 = void Function<X1 extends num>();
typedef F2 = void Function<X2 extends String>();
void f1<Y1 extends num>() {}
void f2<Y2 extends String>() {}
void foo() {
F2 f22 = f2;
}
main() {}