@@ -2,31 +2,31 @@ predicateSemantics.ts(7,16): error TS2871: This expression is always nullish.
22predicateSemantics.ts(10,16): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
33predicateSemantics.ts(26,13): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
44predicateSemantics.ts(27,13): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
5+ predicateSemantics.ts(28,13): error TS2871: This expression is always nullish.
56predicateSemantics.ts(29,13): error TS2871: This expression is always nullish.
67predicateSemantics.ts(30,13): error TS2872: This kind of expression is always truthy.
78predicateSemantics.ts(31,13): error TS2872: This kind of expression is always truthy.
89predicateSemantics.ts(32,13): error TS2871: This expression is always nullish.
9- predicateSemantics.ts(32,13): error TS2871: This expression is always nullish.
1010predicateSemantics.ts(32,21): error TS2871: This expression is always nullish.
11- predicateSemantics.ts(34 ,13): error TS2871: This expression is always nullish.
11+ predicateSemantics.ts(33 ,13): error TS2871: This expression is always nullish.
1212predicateSemantics.ts(34,13): error TS2871: This expression is always nullish.
1313predicateSemantics.ts(34,22): error TS2871: This expression is always nullish.
1414predicateSemantics.ts(36,20): error TS2871: This expression is always nullish.
1515predicateSemantics.ts(37,20): error TS2871: This expression is always nullish.
16+ predicateSemantics.ts(38,21): error TS2871: This expression is always nullish.
1617predicateSemantics.ts(39,21): error TS2871: This expression is always nullish.
1718predicateSemantics.ts(40,21): error TS2871: This expression is always nullish.
18- predicateSemantics.ts(40,21): error TS2871: This expression is always nullish.
1919predicateSemantics.ts(40,29): error TS2871: This expression is always nullish.
2020predicateSemantics.ts(41,21): 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.
21+ predicateSemantics.ts(42,20): error TS2874: This expression is never nullish.
22+ predicateSemantics.ts(43,21): error TS2874: This expression is never nullish.
2523predicateSemantics.ts(45,13): error TS2871: This expression is always nullish.
2624predicateSemantics.ts(45,21): error TS2871: This expression is always nullish.
2725predicateSemantics.ts(45,29): error TS2871: This expression is always nullish.
28- predicateSemantics.ts(46,13): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
29- predicateSemantics.ts(47,13): error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
26+ predicateSemantics.ts(46,13): error TS2871: This expression is always nullish.
27+ predicateSemantics.ts(46,21): error TS2874: This expression is never nullish.
28+ predicateSemantics.ts(47,13): error TS2871: This expression is always nullish.
29+ predicateSemantics.ts(47,22): error TS2874: This expression is never nullish.
3030predicateSemantics.ts(50,8): error TS2872: This kind of expression is always truthy.
3131predicateSemantics.ts(51,11): error TS2872: This kind of expression is always truthy.
3232predicateSemantics.ts(52,8): error TS2872: This kind of expression is always truthy.
@@ -70,8 +70,10 @@ predicateSemantics.ts(53,8): error TS2872: This kind of expression is always tru
7070 ~~~~~
7171!!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
7272 const p03 = null ?? 1;
73+ ~~~~
74+ !!! error TS2871: This expression is always nullish.
7375 const p04 = null ?? null;
74- ~~~~~~~~~~~~
76+ ~~~~
7577!!! error TS2871: This expression is always nullish.
7678 const p05 = (class foo { }) && null;
7779 ~~~~~~~~~~~~~~~
@@ -80,17 +82,15 @@ predicateSemantics.ts(53,8): error TS2872: This kind of expression is always tru
8082 ~~~~~~~~~~~~~~~
8183!!! error TS2872: This kind of expression is always truthy.
8284 const p07 = null ?? null ?? null;
83- ~~~~~~~~~~~~
84- !!! error TS2871: This expression is always nullish.
85- ~~~~~~~~~~~~~~~~~~~~
85+ ~~~~
8686!!! error TS2871: This expression is always nullish.
8787 ~~~~
8888!!! error TS2871: This expression is always nullish.
8989 const p08 = null ?? opt ?? null;
90- const p09 = null ?? (opt ? null : undefined) ?? null;
91- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
90+ ~~~~
9291!!! error TS2871: This expression is always nullish.
93- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
92+ const p09 = null ?? (opt ? null : undefined) ?? null;
93+ ~~~~
9494!!! error TS2871: This expression is always nullish.
9595 ~~~~~~~~~~~~~~~~~~~~~~
9696!!! error TS2871: This expression is always nullish.
@@ -102,43 +102,43 @@ predicateSemantics.ts(53,8): error TS2872: This kind of expression is always tru
102102 ~~~~
103103!!! error TS2871: This expression is always nullish.
104104 const p12 = opt ?? (null ?? 1);
105+ ~~~~
106+ !!! error TS2871: This expression is always nullish.
105107 const p13 = opt ?? (null ?? null);
106- ~~~~~~~~~~~~
108+ ~~~~
107109!!! error TS2871: This expression is always nullish.
108110 const p14 = opt ?? (null ?? null ?? null);
109- ~~~~~~~~~~~~
110- !!! error TS2871: This expression is always nullish.
111- ~~~~~~~~~~~~~~~~~~~~
111+ ~~~~
112112!!! error TS2871: This expression is always nullish.
113113 ~~~~
114114!!! error TS2871: This expression is always nullish.
115115 const p15 = opt ?? (opt ? null : undefined) ?? null;
116116 ~~~~~~~~~~~~~~~~~~~~~~
117117!!! error TS2871: This expression is always nullish.
118118 const p16 = opt ?? 1 ?? 2;
119- ~~~~~~~ ~
120- !!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
119+ ~
120+ !!! error TS2874: This expression is never nullish.
121121 const p17 = opt ?? (opt ? 1 : 2) ?? 3;
122- ~~~~~~~~~ ~~~~~~~~~~~
123- !!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
122+ ~~~~~~~~~~~
123+ !!! error TS2874: This expression is never nullish.
124124
125125 const p21 = null ?? null ?? null ?? null;
126- ~~~~~~~~~~~~
127- !!! error TS2871: This expression is always nullish.
128- ~~~~~~~~~~~~~~~~~~~~
129- !!! error TS2871: This expression is always nullish.
130- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
126+ ~~~~
131127!!! error TS2871: This expression is always nullish.
132128 ~~~~
133129!!! error TS2871: This expression is always nullish.
134130 ~~~~
135131!!! error TS2871: This expression is always nullish.
136132 const p22 = null ?? 1 ?? 1;
137- ~~~~~~~~~
138- !!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
133+ ~~~~
134+ !!! error TS2871: This expression is always nullish.
135+ ~
136+ !!! error TS2874: This expression is never nullish.
139137 const p23 = null ?? (opt ? 1 : 2) ?? 1;
140- ~~~~~~~~~~~~~~~~~~~~~
141- !!! error TS2869: Right operand of ?? is unreachable because the left operand is never nullish.
138+ ~~~~
139+ !!! error TS2871: This expression is always nullish.
140+ ~~~~~~~~~~~
141+ !!! error TS2874: This expression is never nullish.
142142
143143 // Outer expression tests
144144 while ({} as any) { }
0 commit comments