File: propertyAccessChain.3.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 (98 lines) | stat: -rw-r--r-- 7,908 bytes parent folder | download | duplicates (4)
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
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(3,1): error TS2777: The operand of an increment or decrement operator may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(4,1): error TS2777: The operand of an increment or decrement operator may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(5,1): error TS2777: The operand of an increment or decrement operator may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(6,1): error TS2777: The operand of an increment or decrement operator may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(8,3): error TS2777: The operand of an increment or decrement operator may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(9,3): error TS2777: The operand of an increment or decrement operator may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(10,3): error TS2777: The operand of an increment or decrement operator may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(11,3): error TS2777: The operand of an increment or decrement operator may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(13,1): error TS2779: The left-hand side of an assignment expression may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(14,1): error TS2779: The left-hand side of an assignment expression may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(15,1): error TS2779: The left-hand side of an assignment expression may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(16,1): error TS2779: The left-hand side of an assignment expression may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(18,6): error TS2780: The left-hand side of a 'for...in' statement may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(19,6): error TS2780: The left-hand side of a 'for...in' statement may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(20,6): error TS2781: The left-hand side of a 'for...of' statement may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(21,6): error TS2781: The left-hand side of a 'for...of' statement may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(23,7): error TS2779: The left-hand side of an assignment expression may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(24,7): error TS2779: The left-hand side of an assignment expression may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(25,7): error TS2778: The target of an object rest assignment may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(26,7): error TS2778: The target of an object rest assignment may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(27,5): error TS2779: The left-hand side of an assignment expression may not be an optional property access.
tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts(28,5): error TS2779: The left-hand side of an assignment expression may not be an optional property access.


==== tests/cases/conformance/expressions/optionalChaining/propertyAccessChain/propertyAccessChain.3.ts (22 errors) ====
    declare const obj: any;
    
    obj?.a++;
    ~~~~~~
!!! error TS2777: The operand of an increment or decrement operator may not be an optional property access.
    obj?.a.b++;
    ~~~~~~~~
!!! error TS2777: The operand of an increment or decrement operator may not be an optional property access.
    obj?.a--;
    ~~~~~~
!!! error TS2777: The operand of an increment or decrement operator may not be an optional property access.
    obj?.a.b--;
    ~~~~~~~~
!!! error TS2777: The operand of an increment or decrement operator may not be an optional property access.
    
    ++obj?.a;
      ~~~~~~
!!! error TS2777: The operand of an increment or decrement operator may not be an optional property access.
    ++obj?.a.b;
      ~~~~~~~~
!!! error TS2777: The operand of an increment or decrement operator may not be an optional property access.
    --obj?.a;
      ~~~~~~
!!! error TS2777: The operand of an increment or decrement operator may not be an optional property access.
    --obj?.a.b;
      ~~~~~~~~
!!! error TS2777: The operand of an increment or decrement operator may not be an optional property access.
    
    obj?.a = 1;
    ~~~~~~
!!! error TS2779: The left-hand side of an assignment expression may not be an optional property access.
    obj?.a.b = 1;
    ~~~~~~~~
!!! error TS2779: The left-hand side of an assignment expression may not be an optional property access.
    obj?.a += 1;
    ~~~~~~
!!! error TS2779: The left-hand side of an assignment expression may not be an optional property access.
    obj?.a.b += 1;
    ~~~~~~~~
!!! error TS2779: The left-hand side of an assignment expression may not be an optional property access.
    
    for (obj?.a in {});
         ~~~~~~
!!! error TS2780: The left-hand side of a 'for...in' statement may not be an optional property access.
    for (obj?.a.b in {});
         ~~~~~~~~
!!! error TS2780: The left-hand side of a 'for...in' statement may not be an optional property access.
    for (obj?.a of []);
         ~~~~~~
!!! error TS2781: The left-hand side of a 'for...of' statement may not be an optional property access.
    for (obj?.a.b of []);
         ~~~~~~~~
!!! error TS2781: The left-hand side of a 'for...of' statement may not be an optional property access.
    
    ({ a: obj?.a } = { a: 1 });
          ~~~~~~
!!! error TS2779: The left-hand side of an assignment expression may not be an optional property access.
    ({ a: obj?.a.b } = { a: 1 });
          ~~~~~~~~
!!! error TS2779: The left-hand side of an assignment expression may not be an optional property access.
    ({ ...obj?.a } = { a: 1 });
          ~~~~~~
!!! error TS2778: The target of an object rest assignment may not be an optional property access.
    ({ ...obj?.a.b } = { a: 1 });
          ~~~~~~~~
!!! error TS2778: The target of an object rest assignment may not be an optional property access.
    [...obj?.a] = [];
        ~~~~~~
!!! error TS2779: The left-hand side of an assignment expression may not be an optional property access.
    [...obj?.a.b] = [];
        ~~~~~~~~
!!! error TS2779: The left-hand side of an assignment expression may not be an optional property access.