|
1 | | -constDeclarations_access_2.ts(4,1): error TS2322: Type '1' is not assignable to type '0'. |
| 1 | +constDeclarations_access_2.ts(4,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 2 | +constDeclarations_access_2.ts(5,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 3 | +constDeclarations_access_2.ts(6,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 4 | +constDeclarations_access_2.ts(7,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 5 | +constDeclarations_access_2.ts(8,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 6 | +constDeclarations_access_2.ts(9,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 7 | +constDeclarations_access_2.ts(10,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 8 | +constDeclarations_access_2.ts(11,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 9 | +constDeclarations_access_2.ts(12,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 10 | +constDeclarations_access_2.ts(13,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 11 | +constDeclarations_access_2.ts(14,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 12 | +constDeclarations_access_2.ts(15,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 13 | +constDeclarations_access_2.ts(17,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 14 | +constDeclarations_access_2.ts(18,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 15 | +constDeclarations_access_2.ts(19,5): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 16 | +constDeclarations_access_2.ts(20,5): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 17 | +constDeclarations_access_2.ts(22,7): error TS2540: Cannot assign to 'x' because it is a read-only property. |
| 18 | +constDeclarations_access_2.ts(24,3): error TS2540: Cannot assign to 'x' because it is a read-only property. |
2 | 19 |
|
3 | 20 |
|
4 | | -==== constDeclarations_access_2.ts (1 errors) ==== |
| 21 | +==== constDeclarations_access_2.ts (18 errors) ==== |
5 | 22 | ///<reference path='constDeclarations_access_1.ts'/> |
6 | 23 | import m = require('./constDeclarations_access_1'); |
7 | 24 | // Errors |
8 | 25 | m.x = 1; |
9 | | - ~~~ |
10 | | -!!! error TS2322: Type '1' is not assignable to type '0'. |
| 26 | + ~ |
| 27 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
11 | 28 | m.x += 2; |
| 29 | + ~ |
| 30 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
12 | 31 | m.x -= 3; |
| 32 | + ~ |
| 33 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
13 | 34 | m.x *= 4; |
| 35 | + ~ |
| 36 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
14 | 37 | m.x /= 5; |
| 38 | + ~ |
| 39 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
15 | 40 | m.x %= 6; |
| 41 | + ~ |
| 42 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
16 | 43 | m.x <<= 7; |
| 44 | + ~ |
| 45 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
17 | 46 | m.x >>= 8; |
| 47 | + ~ |
| 48 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
18 | 49 | m.x >>>= 9; |
| 50 | + ~ |
| 51 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
19 | 52 | m.x &= 10; |
| 53 | + ~ |
| 54 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
20 | 55 | m.x |= 11; |
| 56 | + ~ |
| 57 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
21 | 58 | m.x ^= 12; |
| 59 | + ~ |
| 60 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
22 | 61 | m |
23 | 62 | m.x++; |
| 63 | + ~ |
| 64 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
24 | 65 | m.x--; |
| 66 | + ~ |
| 67 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
25 | 68 | ++m.x; |
| 69 | + ~ |
| 70 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
26 | 71 | --m.x; |
| 72 | + ~ |
| 73 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
27 | 74 |
|
28 | 75 | ++((m.x)); |
| 76 | + ~ |
| 77 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
29 | 78 |
|
30 | 79 | m["x"] = 0; |
| 80 | + ~~~ |
| 81 | +!!! error TS2540: Cannot assign to 'x' because it is a read-only property. |
31 | 82 |
|
32 | 83 | // OK |
33 | 84 | var a = m.x + 1; |
|
0 commit comments