904882fce3
Closes #42435. Closes #45491. Closes #45493. Bug: https://github.com/dart-lang/sdk/issues/42435 Bug: https://github.com/dart-lang/sdk/issues/45491 Bug: https://github.com/dart-lang/sdk/issues/45493 Change-Id: I368aff553a8bdd5e5312ecf06f0d19c8390a0d22 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193662 Commit-Queue: Dmitry Stefantsov <dmitryas@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
33 lines
1.0 KiB
Dart
33 lines
1.0 KiB
Dart
// Copyright (c) 2021, 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.
|
|
|
|
class A<X extends A<X>> {}
|
|
|
|
typedef F = Function<Y extends A>();
|
|
|
|
class B {
|
|
B(Function<Z extends A>() a);
|
|
factory B.foo(Function<Z extends A>() a) => new B(a);
|
|
foo2(Function<Z extends A>() a) {}
|
|
Function<Z extends A>() foo3() => throw 42;
|
|
Function<Z extends A>() get foo4 => throw 42;
|
|
void set foo5(Function<Z extends A>() a) {}
|
|
Function<Z extends A>() foo6 = (() => throw 42)();
|
|
}
|
|
|
|
bar2(Function<Z extends A>() a) {}
|
|
Function<Z extends A>() bar3() => throw 42;
|
|
Function<Z extends A>() get bar4 => throw 42;
|
|
void set bar5(Function<Z extends A>() a) {}
|
|
Function<Z extends A>() bar6 = (() => throw 42)();
|
|
|
|
extension E on int {
|
|
baz2(Function<Z extends A>() a) {}
|
|
Function<Z extends A>() baz3() => throw 42;
|
|
Function<Z extends A>() get baz4 => throw 42;
|
|
void set baz5(Function<Z extends A>() a) {}
|
|
}
|
|
|
|
main() {}
|