aa376d1520
Closes #43211 Change-Id: I45bb0ee59bbdc4fdd63861e6e434d95bdcb5791a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166481 Reviewed-by: Dmitry Stefantsov <dmitryas@google.com> Commit-Queue: Johnni Winther <johnniwinther@google.com>
55 lines
1.0 KiB
Dart
55 lines
1.0 KiB
Dart
// Copyright (c) 2020, 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>?> {}
|
|
|
|
class D<X extends num> {}
|
|
|
|
extension Extension1<X extends A<X>?> on A<X> {
|
|
void method1<Y extends A<Y>?>(A<Y> a, A<A<Null>>? b) {
|
|
A<Y>? c;
|
|
A<A<Null>>? d;
|
|
}
|
|
|
|
void method2<Y extends String>(D<Y> a, D<String>? b) {
|
|
D<Y>? c;
|
|
D<String>? d;
|
|
}
|
|
}
|
|
|
|
extension ext2<X extends A<Null>?> on A<X> {}
|
|
|
|
class B<X extends A<Null>?> implements A<X> {
|
|
void method1<Y extends A<Null>?>(A<Y> a, A<A<Null>>? b) {
|
|
A<Y>? c;
|
|
A<A<Null>>? d;
|
|
}
|
|
|
|
void method2<Y extends String>(D<Y> a, D<String>? b) {
|
|
D<Y>? c;
|
|
D<String>? d;
|
|
}
|
|
}
|
|
|
|
class C {
|
|
factory C.redirect(A<A<Null>>? a) = C.internal;
|
|
|
|
factory C.fact(A<A<Null>>? a) {
|
|
A<A<Null>>? b;
|
|
D<String>? c;
|
|
return new C.internal(a);
|
|
}
|
|
|
|
C.internal(_) {
|
|
A<A<Null>>? a;
|
|
D<String>? b;
|
|
}
|
|
}
|
|
|
|
test() {
|
|
var a = new A<Null>();
|
|
}
|
|
|
|
main() {}
|