mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
7812f244fe
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: jakebailey <[email protected]>
101 lines
4.2 KiB
Plaintext
101 lines
4.2 KiB
Plaintext
constDeclarations_access_2.ts(4,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(5,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(6,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(7,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(8,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(9,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(10,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(11,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(12,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(13,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(14,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(15,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(17,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(18,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(19,5): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(20,5): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(22,7): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
constDeclarations_access_2.ts(24,3): error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
|
|
|
|
==== constDeclarations_access_2.ts (18 errors) ====
|
|
///<reference path='constDeclarations_access_1.ts'/>
|
|
import m = require('./constDeclarations_access_1');
|
|
// Errors
|
|
m.x = 1;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
m.x += 2;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
m.x -= 3;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
m.x *= 4;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
m.x /= 5;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
m.x %= 6;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
m.x <<= 7;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
m.x >>= 8;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
m.x >>>= 9;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
m.x &= 10;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
m.x |= 11;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
m.x ^= 12;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
m
|
|
m.x++;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
m.x--;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
++m.x;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
--m.x;
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
|
|
++((m.x));
|
|
~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
|
|
m["x"] = 0;
|
|
~~~
|
|
!!! error TS2540: Cannot assign to 'x' because it is a read-only property.
|
|
|
|
// OK
|
|
var a = m.x + 1;
|
|
|
|
function f(v: number) { }
|
|
f(m.x);
|
|
|
|
if (m.x) { }
|
|
|
|
m.x;
|
|
(m.x);
|
|
|
|
-m.x;
|
|
+m.x;
|
|
|
|
m.x.toString();
|
|
|
|
==== constDeclarations_access_1.ts (0 errors) ====
|
|
export const x = 0;
|
|
|