22 lines
1.1 KiB
Plaintext
22 lines
1.1 KiB
Plaintext
tests/cases/compiler/assignToEnum.ts(2,1): error TS2539: Cannot assign to 'A' because it is not a variable.
|
|
tests/cases/compiler/assignToEnum.ts(3,1): error TS2539: Cannot assign to 'A' because it is not a variable.
|
|
tests/cases/compiler/assignToEnum.ts(4,3): error TS2540: Cannot assign to 'foo' because it is a constant or a read-only property.
|
|
tests/cases/compiler/assignToEnum.ts(5,3): error TS2540: Cannot assign to 'foo' because it is a constant or a read-only property.
|
|
|
|
|
|
==== tests/cases/compiler/assignToEnum.ts (4 errors) ====
|
|
enum A { foo, bar }
|
|
A = undefined; // invalid LHS
|
|
~
|
|
!!! error TS2539: Cannot assign to 'A' because it is not a variable.
|
|
A = A.bar; // invalid LHS
|
|
~
|
|
!!! error TS2539: Cannot assign to 'A' because it is not a variable.
|
|
A.foo = 1; // invalid LHS
|
|
~~~
|
|
!!! error TS2540: Cannot assign to 'foo' because it is a constant or a read-only property.
|
|
A.foo = A.bar; // invalid LHS
|
|
~~~
|
|
!!! error TS2540: Cannot assign to 'foo' because it is a constant or a read-only property.
|
|
|
|
|