@@ -18,6 +18,7 @@ comparisonOperatorWithInvalidOperand.ts(34,12): error TS2365: Operator '<' canno
18
18
comparisonOperatorWithInvalidOperand.ts(35,12): error TS2365: Operator '<' cannot be applied to types 'number' and '{}'.
19
19
comparisonOperatorWithInvalidOperand.ts(36,12): error TS2365: Operator '<' cannot be applied to types 'number' and 'string[]'.
20
20
comparisonOperatorWithInvalidOperand.ts(38,12): error TS2365: Operator '<' cannot be applied to types 'number' and 'Number'.
21
+ comparisonOperatorWithInvalidOperand.ts(45,12): error TS2365: Operator '<' cannot be applied to types 'Date' and 'Date'.
21
22
comparisonOperatorWithInvalidOperand.ts(46,12): error TS2365: Operator '<' cannot be applied to types 'Date' and 'boolean'.
22
23
comparisonOperatorWithInvalidOperand.ts(50,12): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'boolean'.
23
24
comparisonOperatorWithInvalidOperand.ts(51,12): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'number'.
@@ -37,6 +38,7 @@ comparisonOperatorWithInvalidOperand.ts(66,12): error TS2365: Operator '>' canno
37
38
comparisonOperatorWithInvalidOperand.ts(67,12): error TS2365: Operator '>' cannot be applied to types 'number' and '{}'.
38
39
comparisonOperatorWithInvalidOperand.ts(68,12): error TS2365: Operator '>' cannot be applied to types 'number' and 'string[]'.
39
40
comparisonOperatorWithInvalidOperand.ts(70,12): error TS2365: Operator '>' cannot be applied to types 'number' and 'Number'.
41
+ comparisonOperatorWithInvalidOperand.ts(77,12): error TS2365: Operator '>' cannot be applied to types 'Date' and 'Date'.
40
42
comparisonOperatorWithInvalidOperand.ts(78,12): error TS2365: Operator '>' cannot be applied to types 'Date' and 'boolean'.
41
43
comparisonOperatorWithInvalidOperand.ts(82,12): error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'boolean'.
42
44
comparisonOperatorWithInvalidOperand.ts(83,12): error TS2365: Operator '<=' cannot be applied to types 'boolean' and 'number'.
@@ -56,6 +58,7 @@ comparisonOperatorWithInvalidOperand.ts(98,12): error TS2365: Operator '<=' cann
56
58
comparisonOperatorWithInvalidOperand.ts(99,12): error TS2365: Operator '<=' cannot be applied to types 'number' and '{}'.
57
59
comparisonOperatorWithInvalidOperand.ts(100,12): error TS2365: Operator '<=' cannot be applied to types 'number' and 'string[]'.
58
60
comparisonOperatorWithInvalidOperand.ts(102,12): error TS2365: Operator '<=' cannot be applied to types 'number' and 'Number'.
61
+ comparisonOperatorWithInvalidOperand.ts(109,12): error TS2365: Operator '<=' cannot be applied to types 'Date' and 'Date'.
59
62
comparisonOperatorWithInvalidOperand.ts(110,12): error TS2365: Operator '<=' cannot be applied to types 'Date' and 'boolean'.
60
63
comparisonOperatorWithInvalidOperand.ts(114,12): error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'boolean'.
61
64
comparisonOperatorWithInvalidOperand.ts(115,12): error TS2365: Operator '>=' cannot be applied to types 'boolean' and 'number'.
@@ -75,10 +78,11 @@ comparisonOperatorWithInvalidOperand.ts(130,12): error TS2365: Operator '>=' can
75
78
comparisonOperatorWithInvalidOperand.ts(131,12): error TS2365: Operator '>=' cannot be applied to types 'number' and '{}'.
76
79
comparisonOperatorWithInvalidOperand.ts(132,12): error TS2365: Operator '>=' cannot be applied to types 'number' and 'string[]'.
77
80
comparisonOperatorWithInvalidOperand.ts(134,12): error TS2365: Operator '>=' cannot be applied to types 'number' and 'Number'.
81
+ comparisonOperatorWithInvalidOperand.ts(141,12): error TS2365: Operator '>=' cannot be applied to types 'Date' and 'Date'.
78
82
comparisonOperatorWithInvalidOperand.ts(142,12): error TS2365: Operator '>=' cannot be applied to types 'Date' and 'boolean'.
79
83
80
84
81
- ==== comparisonOperatorWithInvalidOperand.ts (78 errors) ====
85
+ ==== comparisonOperatorWithInvalidOperand.ts (82 errors) ====
82
86
// repro #15506
83
87
// assumes that only valid comparisons are between anys, numbers and strings
84
88
var a: boolean = false;
@@ -164,6 +168,8 @@ comparisonOperatorWithInvalidOperand.ts(142,12): error TS2365: Operator '>=' can
164
168
165
169
// Date
166
170
var r1c1 = d < d;
171
+ ~~~~~
172
+ !!! error TS2365: Operator '<' cannot be applied to types 'Date' and 'Date'.
167
173
var r1c2 = d < a;
168
174
~~~~~
169
175
!!! error TS2365: Operator '<' cannot be applied to types 'Date' and 'boolean'.
@@ -234,6 +240,8 @@ comparisonOperatorWithInvalidOperand.ts(142,12): error TS2365: Operator '>=' can
234
240
235
241
// Date
236
242
var r2c1 = d > d;
243
+ ~~~~~
244
+ !!! error TS2365: Operator '>' cannot be applied to types 'Date' and 'Date'.
237
245
var r2c2 = d > a;
238
246
~~~~~
239
247
!!! error TS2365: Operator '>' cannot be applied to types 'Date' and 'boolean'.
@@ -304,6 +312,8 @@ comparisonOperatorWithInvalidOperand.ts(142,12): error TS2365: Operator '>=' can
304
312
305
313
// Date
306
314
var r3c1 = d <= d;
315
+ ~~~~~~
316
+ !!! error TS2365: Operator '<=' cannot be applied to types 'Date' and 'Date'.
307
317
var r3c2 = d <= a;
308
318
~~~~~~
309
319
!!! error TS2365: Operator '<=' cannot be applied to types 'Date' and 'boolean'.
@@ -374,6 +384,8 @@ comparisonOperatorWithInvalidOperand.ts(142,12): error TS2365: Operator '>=' can
374
384
375
385
// Date
376
386
var r4c1 = d >= d;
387
+ ~~~~~~
388
+ !!! error TS2365: Operator '>=' cannot be applied to types 'Date' and 'Date'.
377
389
var r4c2 = d >= a;
378
390
~~~~~~
379
391
!!! error TS2365: Operator '>=' cannot be applied to types 'Date' and 'boolean'.
0 commit comments