fdc765faad
TEST=existing Change-Id: I0a8fdf09f742b55357411f12dc6164d4050bb83c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196283 Commit-Queue: Johnni Winther <johnniwinther@google.com> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
37 lines
1.4 KiB
Plaintext
37 lines
1.4 KiB
Plaintext
library /*isNonNullableByDefault*/;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/nnbd/issue44455.dart:6:9: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F'.
|
|
// Try changing type arguments so that they conform to the bounds.
|
|
// class A<X extends F<X>> {}
|
|
// ^
|
|
// pkg/front_end/testcases/nnbd/issue44455.dart:5:11: Context: This is the type variable whose bound isn't conformed to.
|
|
// typedef F<Y extends num> = Y Function();
|
|
// ^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/issue44455.dart:8:10: Error: Type argument 'X' doesn't conform to the bound 'num' of the type variable 'Y' on 'F2'.
|
|
// Try changing type arguments so that they conform to the bounds.
|
|
// class A2<X extends F2<X>> {}
|
|
// ^
|
|
// pkg/front_end/testcases/nnbd/issue44455.dart:9:12: Context: This is the type variable whose bound isn't conformed to.
|
|
// typedef F2<Y extends num> = Y Function();
|
|
// ^
|
|
//
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
typedef F<Y extends core::num> = () → Y;
|
|
typedef F2<Y extends core::num> = () → Y;
|
|
class A<X extends () → self::A::X = () → dynamic> extends core::Object {
|
|
synthetic constructor •() → self::A<self::A::X>
|
|
: super core::Object::•()
|
|
;
|
|
}
|
|
class A2<X extends () → self::A2::X = () → dynamic> extends core::Object {
|
|
synthetic constructor •() → self::A2<self::A2::X>
|
|
: super core::Object::•()
|
|
;
|
|
}
|
|
static method main() → dynamic {}
|