mirror of
https://github.com/dart-lang/sdk
synced 2024-09-06 00:59:09 +00:00
Add some test cases to function_type_bounds_test.dart.
Change-Id: Iba7bb2b1e2a1f63a228154be2a9ce23d46da54cf Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341382 Reviewed-by: Erik Ernst <eernst@google.com> Commit-Queue: Paul Berry <paulberry@google.com>
This commit is contained in:
parent
2d01bf3779
commit
f08dab3b11
|
@ -12,4 +12,18 @@ main() {
|
|||
|
||||
// void fn<T extends int>() is void Function<T extends int>()
|
||||
Expect.isTrue(fnWithNonNullIntBound is fnTypeWithNonNullIntBound);
|
||||
|
||||
// void fn<T extends Object?>() is void Function<T extends Object?>()
|
||||
Expect.isTrue(fnWithNullableObjectBound is fnTypeWithNullableObjectBound);
|
||||
// void fn<T extends int?>() is void Function<T extends int?>()
|
||||
Expect.isTrue(fnWithNullableIntBound is fnTypeWithNullableIntBound);
|
||||
|
||||
// void fn<T extends Object?>() is! void Function<T extends Object>()
|
||||
// (except when using unsound null safety)
|
||||
Expect.equals(hasUnsoundNullSafety,
|
||||
fnWithNullableObjectBound is fnTypeWithNonNullObjectBound);
|
||||
// void fn<T extends Object>() is! void Function<T extends Object?>()
|
||||
// (except when using unsound null safety)
|
||||
Expect.equals(hasUnsoundNullSafety,
|
||||
fnWithNonNullObjectBound is fnTypeWithNullableObjectBound);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue