Skip to content

Commit cfdac8e

Browse files
committed
Issue #946: LanguageFeatures/Instantiate-to-bounds/typeef/static/typedef_FutureOr tests updated according to the recent changes.
1 parent 5543ed8 commit cfdac8e

File tree

3 files changed

+37
-11
lines changed

3 files changed

+37
-11
lines changed

LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_FutureOr_l1_t03.dart

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,23 @@
5151
// SharedOptions=--enable-experiment=non-nullable
5252

5353
import "dart:async";
54+
import "../../../../Utils/expect.dart";
5455

5556
typedef G<X extends FutureOr<X>> = X Function(X);
5657

57-
main() {
58-
G? source;
59-
// ^^^^^^^
58+
test(G source) {
59+
var fsource = toF(source);
60+
F<G<FutureOr<dynamic>>> target = fsource;
61+
62+
F<G<FutureOr<Null>>> target1 = fsource;
63+
// ^^^^^^^
64+
// [analyzer] unspecified
65+
// [cfe] unspecified
66+
67+
F<G<FutureOr<Null>>> target2 = fsource;
68+
// ^^^^^^^
6069
// [analyzer] unspecified
6170
// [cfe] unspecified
6271
}
72+
73+
main() {}

LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_FutureOr_l1_t04.dart

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,16 @@
5050
// SharedOptions=--enable-experiment=non-nullable
5151

5252
import "dart:async";
53+
import "../../../../Utils/expect.dart";
5354

5455
typedef G<X extends FutureOr<X>> = void Function();
5556

56-
main() {
57-
G? source;
58-
// ^^^^^^^
59-
// [analyzer] unspecified
60-
// [cfe] unspecified
57+
test(G source) {
58+
var fsource = toF(source);
59+
60+
F<G<FutureOr<dynamic>>> target = fsource;
61+
F<G<FutureOr<Null>>> target1 = fsource;
62+
F<G<FutureOr<Null>>> target2 = fsource;
6163
}
64+
65+
main() {}

LanguageFeatures/Instantiate-to-bound/typedef/static/typedef_FutureOr_l1_t05.dart

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,18 @@ import "dart:async";
5252

5353
typedef G<X extends FutureOr<X>> = void Function<X1 extends X>();
5454

55-
main() {
56-
G? source;
57-
void Function<X extends FutureOr<dynamic>>()? target = source;
55+
test(G source) {
56+
void Function<X extends FutureOr<dynamic>>() target1 = source;
57+
58+
void Function<X extends FutureOr<Never>>() target2 = source;
59+
// ^^^^^^
60+
// [analyzer] unspecified
61+
// [cfe] unspecified
62+
63+
void Function<X extends FutureOr<Null>>() target3 = source;
64+
// ^^^^^^
65+
// [analyzer] unspecified
66+
// [cfe] unspecified
5867
}
68+
69+
main() {}

0 commit comments

Comments
 (0)