File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3060,7 +3060,7 @@ module Make (Statement : Statement_sig.S) : Type_annotation_sig.S = struct
30603060 let (iface_sig, properties) =
30613061 add_interface_properties env properties ~this: (implicit_mixed_this reason) iface_sig
30623062 in
3063- let (_, t) = Class_type_sig. classtype ~check_polarity: false cx iface_sig in
3063+ let (_, t) = Class_type_sig. classtype ~check_polarity: true cx iface_sig in
30643064 ( t,
30653065 iface_sig,
30663066 {
Original file line number Diff line number Diff line change 11type O < + T > = { ( x : T ) : void } ; // Error: +T in a negative position
2- interface I < + T > { ( x : T ) : void } ; // Error: +T in a negative position (TODO)
2+ interface I < + T > { ( x : T ) : void } ; // Error: +T in a negative position
Original file line number Diff line number Diff line change @@ -13,6 +13,21 @@ References:
1313 ^ [1]
1414
1515
16+ Error ----------------------------------------------------------------------------------------------------- call.js:2:23
17+
18+ Cannot use `T` [1] in an input position because `T` [1] is expected to occur only in output positions.
19+ [incompatible-variance]
20+
21+ call.js:2:23
22+ 2| interface I<+T> { (x: T): void }; // Error: +T in a negative position
23+ ^
24+
25+ References:
26+ call.js:2:14
27+ 2| interface I<+T> { (x: T): void }; // Error: +T in a negative position
28+ ^ [1]
29+
30+
1631Error ------------------------------------------------------------------------------------------------------ fun.js:3:19
1732
1833Cannot use `T` [1] in an input position because `T` [1] is expected to occur only in output positions.
@@ -294,4 +309,4 @@ References:
294309
295310
296311
297- Found 22 errors
312+ Found 23 errors
You can’t perform that action at this time.
0 commit comments