/
comparisonOperatorWithIdenticalPrimitiveType.errors.txt
130 lines (119 loc) · 6.14 KB
/
comparisonOperatorWithIdenticalPrimitiveType.errors.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(15,11): error TS18050: The value 'null' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(15,18): error TS18050: The value 'null' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(16,11): error TS18050: The value 'undefined' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(16,23): error TS18050: The value 'undefined' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(24,11): error TS18050: The value 'null' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(24,18): error TS18050: The value 'null' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(25,11): error TS18050: The value 'undefined' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(25,23): error TS18050: The value 'undefined' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(33,11): error TS18050: The value 'null' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(33,19): error TS18050: The value 'null' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(34,11): error TS18050: The value 'undefined' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(34,24): error TS18050: The value 'undefined' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(42,11): error TS18050: The value 'null' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(42,19): error TS18050: The value 'null' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(43,11): error TS18050: The value 'undefined' cannot be used here.
tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts(43,24): error TS18050: The value 'undefined' cannot be used here.
==== tests/cases/conformance/expressions/binaryOperators/comparisonOperator/comparisonOperatorWithIdenticalPrimitiveType.ts (16 errors) ====
enum E { a, b, c }
var a: number;
var b: boolean;
var c: string;
var d: void;
var e: E;
// operator <
var ra1 = a < a;
var ra2 = b < b;
var ra3 = c < c;
var ra4 = d < d;
var ra5 = e < e;
var ra6 = null < null;
~~~~
!!! error TS18050: The value 'null' cannot be used here.
~~~~
!!! error TS18050: The value 'null' cannot be used here.
var ra7 = undefined < undefined;
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
// operator >
var rb1 = a > a;
var rb2 = b > b;
var rb3 = c > c;
var rb4 = d > d;
var rb5 = e > e;
var rb6 = null > null;
~~~~
!!! error TS18050: The value 'null' cannot be used here.
~~~~
!!! error TS18050: The value 'null' cannot be used here.
var rb7 = undefined > undefined;
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
// operator <=
var rc1 = a <= a;
var rc2 = b <= b;
var rc3 = c <= c;
var rc4 = d <= d;
var rc5 = e <= e;
var rc6 = null <= null;
~~~~
!!! error TS18050: The value 'null' cannot be used here.
~~~~
!!! error TS18050: The value 'null' cannot be used here.
var rc7 = undefined <= undefined;
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
// operator >=
var rd1 = a >= a;
var rd2 = b >= b;
var rd3 = c >= c;
var rd4 = d >= d;
var rd5 = e >= e;
var rd6 = null >= null;
~~~~
!!! error TS18050: The value 'null' cannot be used here.
~~~~
!!! error TS18050: The value 'null' cannot be used here.
var rd7 = undefined >= undefined;
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
~~~~~~~~~
!!! error TS18050: The value 'undefined' cannot be used here.
// operator ==
var re1 = a == a;
var re2 = b == b;
var re3 = c == c;
var re4 = d == d;
var re5 = e == e;
var re6 = null == null;
var re7 = undefined == undefined;
// operator !=
var rf1 = a != a;
var rf2 = b != b;
var rf3 = c != c;
var rf4 = d != d;
var rf5 = e != e;
var rf6 = null != null;
var rf7 = undefined != undefined;
// operator ===
var rg1 = a === a;
var rg2 = b === b;
var rg3 = c === c;
var rg4 = d === d;
var rg5 = e === e;
var rg6 = null === null;
var rg7 = undefined === undefined;
// operator !==
var rh1 = a !== a;
var rh2 = b !== b;
var rh3 = c !== c;
var rh4 = d !== d;
var rh5 = e !== e;
var rh6 = null !== null;
var rh7 = undefined !== undefined;