File: assignmentLHSIsValue.errors.txt

package info (click to toggle)
node-typescript 5.0.4%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 459,140 kB
  • sloc: javascript: 1,972,754; makefile: 6; sh: 1
file content (190 lines) | stat: -rw-r--r-- 13,300 bytes parent folder | download
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(6,21): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(7,13): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(8,21): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(11,18): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(13,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(17,1): error TS2631: Cannot assign to 'M' because it is a namespace.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(19,1): error TS2629: Cannot assign to 'C' because it is a class.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(22,1): error TS2628: Cannot assign to 'E' because it is an enum.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(24,1): error TS2630: Cannot assign to 'foo' because it is a function.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(27,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(28,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(29,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(30,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(31,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(32,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(35,9): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(38,2): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(38,6): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(42,36): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(44,19): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(46,27): error TS1034: 'super' must be followed by an argument list or member access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(50,20): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(51,11): error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(51,13): error TS1005: ';' expected.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(54,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(57,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(58,2): error TS2631: Cannot assign to 'M' because it is a namespace.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(59,2): error TS2629: Cannot assign to 'C' because it is a class.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(60,2): error TS2628: Cannot assign to 'E' because it is an enum.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(61,2): error TS2630: Cannot assign to 'foo' because it is a function.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(62,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(63,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(64,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(65,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(66,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(67,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(68,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(69,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts(70,1): error TS2364: The left-hand side of an assignment expression must be a variable or a property access.


==== tests/cases/conformance/expressions/assignmentOperator/assignmentLHSIsValue.ts (39 errors) ====
    // expected error for all the LHS of assignments
    var value: any;
    
    // this
    class C {
        constructor() { this = value; }
                        ~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
        foo() { this = value; }
                ~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
        static sfoo() { this = value; }
                        ~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    }
    
    function foo() { this = value; }
                     ~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    
    this = value;
    ~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    
    // identifiers: module, class, enum, function
    module M { export var a; }
    M = value;
    ~
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
    
    C = value;
    ~
!!! error TS2629: Cannot assign to 'C' because it is a class.
    
    enum E { }
    E = value;
    ~
!!! error TS2628: Cannot assign to 'E' because it is an enum.
    
    foo = value;
    ~~~
!!! error TS2630: Cannot assign to 'foo' because it is a function.
    
    // literals
    null = value;
    ~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    true = value;
    ~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    false = value;
    ~~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    0 = value;
    ~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    '' = value;
    ~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    /d+/ = value;
    ~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    
    // object literals
    { a: 0} = value;
            ~
!!! error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses.
    
    // array literals
    ['', ''] = value;
     ~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
         ~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    
    // super
    class Derived extends C {
        constructor() { super(); super = value; }
                                       ~
!!! error TS1034: 'super' must be followed by an argument list or member access.
    
        foo() { super = value }
                      ~
!!! error TS1034: 'super' must be followed by an argument list or member access.
    
        static sfoo() { super = value; }
                              ~
!!! error TS1034: 'super' must be followed by an argument list or member access.
    }
    
    // function expression
    function bar() { } = value;
                       ~
!!! error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses.
    () => { } = value;
              ~
!!! error TS2809: Declaration or statement expected. This '=' follows a block of statements, so if you intended to write a destructuring assignment, you might need to wrap the whole assignment in parentheses.
                ~~~~~
!!! error TS1005: ';' expected.
    
    // function calls
    foo() = value;
    ~~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    
    // parentheses, the containted expression is value
    (this) = value;
    ~~~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    (M) = value;
     ~
!!! error TS2631: Cannot assign to 'M' because it is a namespace.
    (C) = value;
     ~
!!! error TS2629: Cannot assign to 'C' because it is a class.
    (E) = value;
     ~
!!! error TS2628: Cannot assign to 'E' because it is an enum.
    (foo) = value;
     ~~~
!!! error TS2630: Cannot assign to 'foo' because it is a function.
    (null) = value;
    ~~~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    (true) = value;
    ~~~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    (0) = value;
    ~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    ('') = value;
    ~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    (/d+/) = value;
    ~~~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    ({}) = value;
    ~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    ([]) = value;
    ~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    (function baz() { }) = value;
    ~~~~~~~~~~~~~~~~~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.
    (foo()) = value;
    ~~~~~~~
!!! error TS2364: The left-hand side of an assignment expression must be a variable or a property access.