File tree Expand file tree Collapse file tree 3 files changed +37
-11
lines changed
LanguageFeatures/Instantiate-to-bound/typedef/static Expand file tree Collapse file tree 3 files changed +37
-11
lines changed Original file line number Diff line number Diff line change 51
51
// SharedOptions=--enable-experiment=non-nullable
52
52
53
53
import "dart:async" ;
54
+ import "../../../../Utils/expect.dart" ;
54
55
55
56
typedef G <X extends FutureOr <X >> = X Function (X );
56
57
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
+ // ^^^^^^^
60
69
// [analyzer] unspecified
61
70
// [cfe] unspecified
62
71
}
72
+
73
+ main () {}
Original file line number Diff line number Diff line change 50
50
// SharedOptions=--enable-experiment=non-nullable
51
51
52
52
import "dart:async" ;
53
+ import "../../../../Utils/expect.dart" ;
53
54
54
55
typedef G <X extends FutureOr <X >> = void Function ();
55
56
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;
61
63
}
64
+
65
+ main () {}
Original file line number Diff line number Diff line change @@ -52,7 +52,18 @@ import "dart:async";
52
52
53
53
typedef G <X extends FutureOr <X >> = void Function <X1 extends X >();
54
54
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
58
67
}
68
+
69
+ main () {}
You can’t perform that action at this time.
0 commit comments