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>
45 lines
1.9 KiB
Plaintext
45 lines
1.9 KiB
Plaintext
library /*isNonNullableByDefault*/;
|
|
//
|
|
// Problems in library:
|
|
//
|
|
// pkg/front_end/testcases/nnbd/never_bound.dart:10:3: Error: Type argument 'Null' doesn't conform to the bound 'Never' of the type variable 'T' on 'GenericNever'.
|
|
// Try changing type arguments so that they conform to the bounds.
|
|
// GenericNever<Null>();
|
|
// ^
|
|
// pkg/front_end/testcases/nnbd/never_bound.dart:5:20: Context: This is the type variable whose bound isn't conformed to.
|
|
// class GenericNever<T extends Never> {
|
|
// ^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/never_bound.dart:11:3: Error: Type argument 'void' doesn't conform to the bound 'Never' of the type variable 'T' on 'GenericNever'.
|
|
// Try changing type arguments so that they conform to the bounds.
|
|
// GenericNever<void>();
|
|
// ^
|
|
// pkg/front_end/testcases/nnbd/never_bound.dart:5:20: Context: This is the type variable whose bound isn't conformed to.
|
|
// class GenericNever<T extends Never> {
|
|
// ^
|
|
//
|
|
// pkg/front_end/testcases/nnbd/never_bound.dart:12:3: Error: Type argument 'int' doesn't conform to the bound 'Never' of the type variable 'T' on 'GenericNever'.
|
|
// Try changing type arguments so that they conform to the bounds.
|
|
// GenericNever<int>();
|
|
// ^
|
|
// pkg/front_end/testcases/nnbd/never_bound.dart:5:20: Context: This is the type variable whose bound isn't conformed to.
|
|
// class GenericNever<T extends Never> {
|
|
// ^
|
|
//
|
|
import self as self;
|
|
import "dart:core" as core;
|
|
|
|
class GenericNever<T extends Never> extends core::Object {
|
|
synthetic constructor •() → self::GenericNever<self::GenericNever::T>
|
|
: super core::Object::•()
|
|
;
|
|
method getParamType() → dynamic
|
|
return self::GenericNever::T;
|
|
}
|
|
static method errors() → dynamic {
|
|
new self::GenericNever::•<Null>();
|
|
new self::GenericNever::•<void>();
|
|
new self::GenericNever::•<core::int>();
|
|
}
|
|
static method main() → dynamic {}
|