Files
sdk/pkg/front_end/testcases/general/issue45330.dart.weak.expect
T
Johnni Winther fdc765faad [cfe] Make TypeParameter.defaultType non-nullable
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>
2021-04-21 13:51:50 +00:00

37 lines
1.5 KiB
Plaintext

library /*isNonNullableByDefault*/;
//
// Problems in library:
//
// pkg/front_end/testcases/general/issue45330.dart:10:31: Error: Type 'T' is a bound of itself via 'T'.
// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
// genericMethod<void Function<T extends T>()>();
// ^
//
// pkg/front_end/testcases/general/issue45330.dart:10:3: Error: A generic function type can't be used as a type argument.
// Try using a non-generic function type.
// genericMethod<void Function<T extends T>()>();
// ^
//
// pkg/front_end/testcases/general/issue45330_lib.dart:35:31: Error: Type 'T' is a bound of itself via 'T'.
// Try breaking the cycle by removing at least on of the 'extends' clauses in the cycle.
// genericMethod<void Function<T extends T>()>();
// ^
//
// pkg/front_end/testcases/general/issue45330_lib.dart:35:3: Error: A generic function type can't be used as a type argument.
// Try using a non-generic function type.
// genericMethod<void Function<T extends T>()>();
// ^
//
import self as self;
import "dart:core" as core;
part issue45330_lib.dart;
static method genericMethod<T extends core::Object? = dynamic>() → void {}
static method testInMain() → dynamic {
self::genericMethod<<T extends invalid-type>() → void>();
}
static method main() → dynamic {}
static method /* from org-dartlang-testcase:///issue45330_lib.dart */ testInPart() → dynamic {
self::genericMethod<<T extends invalid-type>() → void>();
}