mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:39:48 +00:00
2bf3259005
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>
25 lines
602 B
Dart
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() {}
|