@@ -37,10 +37,10 @@ extension type SFE2(SFE _) implements SFE {}
3737void main () async {
3838 // 1 (use rule 1).
3939 await N (Future <int >.value (1 ));
40- //^^^^^
41- // [analyzer] COMPILE_TIME_ERROR.AWAIT_OF_INCOMPATIBLE_TYPE
42- // ^^^^^^^^^^^^^^^^^^^^^^ ^
43- // [cfe] The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'.
40+ // [error column 3, length 5]
41+ // [analyzer] COMPILE_TIME_ERROR.AWAIT_OF_INCOMPATIBLE_TYPE
42+ // ^
43+ // [cfe] The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'.
4444 await F (Future <int >.value (1 ));
4545
4646 N n = N (Future <int >.value (1 ));
@@ -50,10 +50,10 @@ void main() async {
5050
5151 // 2.1 (use rule 2 which in turn uses rule 1).
5252 await nq;
53- //^^^^^
54- // [analyzer] COMPILE_TIME_ERROR.AWAIT_OF_INCOMPATIBLE_TYPE
55- // ^
56- // [cfe] The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'.
53+ // [error column 3, length 5]
54+ // [analyzer] COMPILE_TIME_ERROR.AWAIT_OF_INCOMPATIBLE_TYPE
55+ // ^
56+ // [cfe] The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'.
5757
5858 await fq;
5959
@@ -70,34 +70,34 @@ void main() async {
7070 await fofq;
7171
7272 var fut = Future <int >.value (1 );
73- foo< Object ? , N , F , N ? , F ? , FutureOr <N >, FutureOr <F >, FutureOr <N >? ,
74- FutureOr <F >? > (
75- fut,
76- N (fut),
77- F (fut),
78- null ,
79- null ,
80- N (fut),
81- F (fut),
82- N (fut),
83- F (fut),
84- );
73+ foo<
74+ Object ? ,
75+ N ,
76+ F ,
77+ N ? ,
78+ F ? ,
79+ FutureOr <N >,
80+ FutureOr <F >,
81+ FutureOr <N >? ,
82+ FutureOr <F >?
83+ > (fut, N (fut), F (fut), null , null , N (fut), F (fut), N (fut), F (fut));
8584
8685 var sfe2 = SFE2 (SFE (SF ()));
8786 await sfe2;
8887}
8988
9089// Test type parameter types.
9190void foo<
92- X ,
93- XN extends N ,
94- XF extends F ,
95- XNQ extends N ? ,
96- XFQ extends F ? ,
97- XFoN extends FutureOr <N >,
98- XFoF extends FutureOr <F >,
99- XFoNQ extends FutureOr <N >? ,
100- XFoFQ extends FutureOr <F >? > (
91+ X ,
92+ XN extends N ,
93+ XF extends F ,
94+ XNQ extends N ? ,
95+ XFQ extends F ? ,
96+ XFoN extends FutureOr <N >,
97+ XFoF extends FutureOr <F >,
98+ XFoNQ extends FutureOr <N >? ,
99+ XFoFQ extends FutureOr <F >?
100+ > (
101101 X x,
102102 XN xn,
103103 XF xf,
@@ -112,10 +112,10 @@ void foo<
112112
113113 // 4.1.
114114 await xn;
115- //^^^^^
116- // [analyzer] COMPILE_TIME_ERROR.AWAIT_OF_INCOMPATIBLE_TYPE
117- // ^ ^
118- // [cfe] The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'.
115+ // [error column 3, length 5]
116+ // [analyzer] COMPILE_TIME_ERROR.AWAIT_OF_INCOMPATIBLE_TYPE
117+ // ^
118+ // [cfe] The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'.
119119
120120 await xf;
121121 await xfon;
@@ -125,10 +125,10 @@ void foo<
125125
126126 // 4.2.
127127 await xnq;
128- //^^^^^
129- // [analyzer] COMPILE_TIME_ERROR.AWAIT_OF_INCOMPATIBLE_TYPE
130- // ^^ ^
131- // [cfe] The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'.
128+ // [error column 3, length 5]
129+ // [analyzer] COMPILE_TIME_ERROR.AWAIT_OF_INCOMPATIBLE_TYPE
130+ // ^
131+ // [cfe] The 'await' expression can't be used for an expression with an extension type that is not a subtype of 'Future'.
132132
133133 await xfq;
134134
0 commit comments