@@ -7,29 +7,26 @@ predicateSemantics.ts(29,13): error TS2871: This expression is always nullish.
77predicateSemantics.ts(30,13): error TS2872: This kind of expression is always truthy.
88predicateSemantics.ts(31,13): error TS2872: This kind of expression is always truthy.
99predicateSemantics.ts(32,13): error TS2871: This expression is always nullish.
10- predicateSemantics.ts(32,21 ): error TS2871: This expression is always nullish.
10+ predicateSemantics.ts(32,13 ): error TS2871: This expression is always nullish.
1111predicateSemantics.ts(33,13): error TS2871: This expression is always nullish.
1212predicateSemantics.ts(34,13): error TS2871: This expression is always nullish.
13- predicateSemantics.ts(34,22 ): error TS2871: This expression is always nullish.
14- predicateSemantics.ts(36,20 ): error TS2871: This expression is always nullish.
15- predicateSemantics.ts(37,20 ): error TS2871: This expression is always nullish.
13+ predicateSemantics.ts(34,13 ): error TS2871: This expression is always nullish.
14+ predicateSemantics.ts(36,13 ): error TS2871: This expression is always nullish.
15+ predicateSemantics.ts(37,13 ): error TS2871: This expression is always nullish.
1616predicateSemantics.ts(38,21): error TS2871: This expression is always nullish.
17- predicateSemantics.ts(38,29): error TS2881: This expression is never nullish.
1817predicateSemantics.ts(39,21): error TS2871: This expression is always nullish.
19- predicateSemantics.ts(39,29): error TS2871: This expression is always nullish.
2018predicateSemantics.ts(40,21): error TS2871: This expression is always nullish.
21- predicateSemantics.ts(40,29): error TS2871: This expression is always nullish.
22- predicateSemantics.ts(40,37): error TS2871: This expression is always nullish.
23- predicateSemantics.ts(41,21): error TS2871: This expression is always nullish.
24- predicateSemantics.ts(42,20): error TS2881: This expression is never nullish.
25- predicateSemantics.ts(43,21): error TS2881: This expression is never nullish.
19+ predicateSemantics.ts(40,21): error TS2871: This expression is always nullish.
20+ predicateSemantics.ts(41,13): error TS2871: This expression is always nullish.
21+ predicateSemantics.ts(42,13): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
22+ predicateSemantics.ts(43,13): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
23+ predicateSemantics.ts(45,13): error TS2871: This expression is always nullish.
24+ predicateSemantics.ts(45,13): error TS2871: This expression is always nullish.
2625predicateSemantics.ts(45,13): error TS2871: This expression is always nullish.
27- predicateSemantics.ts(45,21): error TS2871: This expression is always nullish.
28- predicateSemantics.ts(45,29): error TS2871: This expression is always nullish.
2926predicateSemantics.ts(46,13): error TS2871: This expression is always nullish.
30- predicateSemantics.ts(46,21 ): error TS2881: This expression is never nullish.
27+ predicateSemantics.ts(46,13 ): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
3128predicateSemantics.ts(47,13): error TS2871: This expression is always nullish.
32- predicateSemantics.ts(47,22 ): error TS2881: This expression is never nullish.
29+ predicateSemantics.ts(47,13 ): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
3330predicateSemantics.ts(50,8): error TS2872: This kind of expression is always truthy.
3431predicateSemantics.ts(51,11): error TS2872: This kind of expression is always truthy.
3532predicateSemantics.ts(52,8): error TS2872: This kind of expression is always truthy.
@@ -41,7 +38,7 @@ predicateSemantics.ts(89,1): error TS2869: Right operand of ?? is unreachable be
4138predicateSemantics.ts(90,1): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
4239
4340
44- ==== predicateSemantics.ts (41 errors) ====
41+ ==== predicateSemantics.ts (38 errors) ====
4542 declare let opt: number | undefined;
4643
4744 // OK: One or other operand is possibly nullish
@@ -92,67 +89,61 @@ predicateSemantics.ts(90,1): error TS2869: Right operand of ?? is unreachable be
9289 const p07 = null ?? null ?? null;
9390 ~~~~
9491!!! error TS2871: This expression is always nullish.
95- ~~~~
92+ ~~~~~~~~ ~~~~
9693!!! error TS2871: This expression is always nullish.
9794 const p08 = null ?? opt ?? null;
9895 ~~~~
9996!!! error TS2871: This expression is always nullish.
10097 const p09 = null ?? (opt ? null : undefined) ?? null;
10198 ~~~~
10299!!! error TS2871: This expression is always nullish.
103- ~~~~~~~~~~~~~~~~~~~~~~
100+ ~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
104101!!! error TS2871: This expression is always nullish.
105102
106103 const p10 = opt ?? null ?? 1;
107- ~~~~
104+ ~~~~~~~ ~~~~
108105!!! error TS2871: This expression is always nullish.
109106 const p11 = opt ?? null ?? null;
110- ~~~~
107+ ~~~~~~~ ~~~~
111108!!! error TS2871: This expression is always nullish.
112109 const p12 = opt ?? (null ?? 1);
113110 ~~~~
114111!!! error TS2871: This expression is always nullish.
115- ~
116- !!! error TS2881: This expression is never nullish.
117112 const p13 = opt ?? (null ?? null);
118113 ~~~~
119- !!! error TS2871: This expression is always nullish.
120- ~~~~
121114!!! error TS2871: This expression is always nullish.
122115 const p14 = opt ?? (null ?? null ?? null);
123116 ~~~~
124117!!! error TS2871: This expression is always nullish.
125- ~~~~
126- !!! error TS2871: This expression is always nullish.
127- ~~~~
118+ ~~~~~~~~~~~~
128119!!! error TS2871: This expression is always nullish.
129120 const p15 = opt ?? (opt ? null : undefined) ?? null;
130- ~~~~~~~~~~~~~~~~~~~~~~
121+ ~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
131122!!! error TS2871: This expression is always nullish.
132123 const p16 = opt ?? 1 ?? 2;
133- ~
134- !!! error TS2881: This expression is never nullish.
124+ ~~~~~~~ ~
125+ !!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
135126 const p17 = opt ?? (opt ? 1 : 2) ?? 3;
136- ~~~~~~~~~~~
137- !!! error TS2881: This expression is never nullish.
127+ ~~~~~~~~~ ~~~~~~~~~~~
128+ !!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
138129
139130 const p21 = null ?? null ?? null ?? null;
140131 ~~~~
141132!!! error TS2871: This expression is always nullish.
142- ~~~~
133+ ~~~~~~~~ ~~~~
143134!!! error TS2871: This expression is always nullish.
144- ~~~~
135+ ~~~~~~~~~~~~~~~~ ~~~~
145136!!! error TS2871: This expression is always nullish.
146137 const p22 = null ?? 1 ?? 1;
147138 ~~~~
148139!!! error TS2871: This expression is always nullish.
149- ~
150- !!! error TS2881: This expression is never nullish.
140+ ~~~~~~~~ ~
141+ !!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
151142 const p23 = null ?? (opt ? 1 : 2) ?? 1;
152143 ~~~~
153144!!! error TS2871: This expression is always nullish.
154- ~~~~~~~~~~~
155- !!! error TS2881: This expression is never nullish.
145+ ~~~~~~~~~~ ~~~~~~~~~~~
146+ !!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
156147
157148 // Outer expression tests
158149 while ({} as any) { }
0 commit comments