@@ -161,58 +161,127 @@ function f11<T, U extends T>(x: T | number, y: U | number) {
161
161
>y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 40, 43))
162
162
}
163
163
164
- function f12<T, U>(x: T & U , y: T & U ) {
164
+ function f12<T, U extends T >(x: T | number , y: U | number ) {
165
165
>f12 : Symbol(f12, Decl(unconstrainedTypeComparison.ts, 42, 1))
166
166
>T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 44, 13))
167
167
>U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 44, 15))
168
- >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 44, 19))
169
168
>T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 44, 13))
170
- >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 44, 15))
171
- >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 44, 28))
169
+ >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 44, 29))
172
170
>T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 44, 13))
171
+ >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 44, 43))
173
172
>U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 44, 15))
174
173
174
+ if (x === undefined) {
175
+ >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 44, 29))
176
+ >undefined : Symbol(undefined)
177
+
178
+ return false;
179
+ }
180
+ return x < y;
181
+ >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 44, 29))
182
+ >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 44, 43))
183
+ }
184
+
185
+ function f13<T, U extends T | number>(x: U, y: U) {
186
+ >f13 : Symbol(f13, Decl(unconstrainedTypeComparison.ts, 49, 1))
187
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 51, 13))
188
+ >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 51, 15))
189
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 51, 13))
190
+ >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 51, 38))
191
+ >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 51, 15))
192
+ >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 51, 43))
193
+ >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 51, 15))
194
+
195
+ if (x === undefined) {
196
+ >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 51, 38))
197
+ >undefined : Symbol(undefined)
198
+
199
+ return false;
200
+ }
201
+ return x < y;
202
+ >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 51, 38))
203
+ >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 51, 43))
204
+ }
205
+
206
+ function f14<T, U>(x: T & U, y: T & U) {
207
+ >f14 : Symbol(f14, Decl(unconstrainedTypeComparison.ts, 56, 1))
208
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 58, 13))
209
+ >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 58, 15))
210
+ >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 58, 19))
211
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 58, 13))
212
+ >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 58, 15))
213
+ >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 58, 28))
214
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 58, 13))
215
+ >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 58, 15))
216
+
217
+ return x < y;
218
+ >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 58, 19))
219
+ >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 58, 28))
220
+ }
221
+
222
+ function f15<T, U extends T>(x: T & number, y: U & number) {
223
+ >f15 : Symbol(f15, Decl(unconstrainedTypeComparison.ts, 60, 1))
224
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 62, 13))
225
+ >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 62, 15))
226
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 62, 13))
227
+ >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 62, 29))
228
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 62, 13))
229
+ >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 62, 43))
230
+ >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 62, 15))
231
+
175
232
return x < y;
176
- >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 44, 19 ))
177
- >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 44, 28 ))
233
+ >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 62, 29 ))
234
+ >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 62, 43 ))
178
235
}
179
236
180
- function f13<T, U extends T>(x: T & number, y: U & number) {
181
- >f13 : Symbol(f13, Decl(unconstrainedTypeComparison.ts, 46, 1))
182
- >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 48, 13))
183
- >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 48, 15))
184
- >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 48, 13))
185
- >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 48, 29))
186
- >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 48, 13))
187
- >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 48, 43))
188
- >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 48, 15))
237
+ function f16<T, U extends T>(x: T & U, y: U) {
238
+ >f16 : Symbol(f16, Decl(unconstrainedTypeComparison.ts, 64, 1))
239
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 66, 13))
240
+ >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 66, 15))
241
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 66, 13))
242
+ >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 66, 29))
243
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 66, 13))
244
+ >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 66, 15))
245
+ >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 66, 38))
246
+ >U : Symbol(U, Decl(unconstrainedTypeComparison.ts, 66, 15))
189
247
248
+ if (x === undefined) {
249
+ >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 66, 29))
250
+ >undefined : Symbol(undefined)
251
+
252
+ return false;
253
+ }
254
+ if (y === null) {
255
+ >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 66, 38))
256
+
257
+ return false;
258
+ }
190
259
return x < y;
191
- >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 48 , 29))
192
- >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 48, 43 ))
260
+ >x : Symbol(x, Decl(unconstrainedTypeComparison.ts, 66 , 29))
261
+ >y : Symbol(y, Decl(unconstrainedTypeComparison.ts, 66, 38 ))
193
262
}
194
263
195
264
196
265
function compare<T>(a: T, b: T): boolean {
197
- >compare : Symbol(compare, Decl(unconstrainedTypeComparison.ts, 50 , 1))
198
- >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 53 , 17))
199
- >a : Symbol(a, Decl(unconstrainedTypeComparison.ts, 53 , 20))
200
- >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 53 , 17))
201
- >b : Symbol(b, Decl(unconstrainedTypeComparison.ts, 53 , 25))
202
- >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 53 , 17))
266
+ >compare : Symbol(compare, Decl(unconstrainedTypeComparison.ts, 74 , 1))
267
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 77 , 17))
268
+ >a : Symbol(a, Decl(unconstrainedTypeComparison.ts, 77 , 20))
269
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 77 , 17))
270
+ >b : Symbol(b, Decl(unconstrainedTypeComparison.ts, 77 , 25))
271
+ >T : Symbol(T, Decl(unconstrainedTypeComparison.ts, 77 , 17))
203
272
204
273
if (a === undefined) {
205
- >a : Symbol(a, Decl(unconstrainedTypeComparison.ts, 53 , 20))
274
+ >a : Symbol(a, Decl(unconstrainedTypeComparison.ts, 77 , 20))
206
275
>undefined : Symbol(undefined)
207
276
208
277
return false;
209
278
}
210
279
if (b === null) {
211
- >b : Symbol(b, Decl(unconstrainedTypeComparison.ts, 53 , 25))
280
+ >b : Symbol(b, Decl(unconstrainedTypeComparison.ts, 77 , 25))
212
281
213
282
return false;
214
283
}
215
284
return a > b;
216
- >a : Symbol(a, Decl(unconstrainedTypeComparison.ts, 53 , 20))
217
- >b : Symbol(b, Decl(unconstrainedTypeComparison.ts, 53 , 25))
285
+ >a : Symbol(a, Decl(unconstrainedTypeComparison.ts, 77 , 20))
286
+ >b : Symbol(b, Decl(unconstrainedTypeComparison.ts, 77 , 25))
218
287
}
0 commit comments