File: compoundAssignmentLHSIsReference.symbols

package info (click to toggle)
node-typescript 4.9.5%2Bds1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 533,908 kB
  • sloc: javascript: 2,018,330; makefile: 7; sh: 1
file content (100 lines) | stat: -rw-r--r-- 4,276 bytes parent folder | download | duplicates (7)
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
=== tests/cases/conformance/expressions/assignmentOperator/compoundAssignmentLHSIsReference.ts ===
var value;
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

// identifiers: variable and parameter
var x1: number;
>x1 : Symbol(x1, Decl(compoundAssignmentLHSIsReference.ts, 3, 3))

x1 *= value;
>x1 : Symbol(x1, Decl(compoundAssignmentLHSIsReference.ts, 3, 3))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

x1 += value;
>x1 : Symbol(x1, Decl(compoundAssignmentLHSIsReference.ts, 3, 3))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

function fn1(x2: number) {
>fn1 : Symbol(fn1, Decl(compoundAssignmentLHSIsReference.ts, 5, 12))
>x2 : Symbol(x2, Decl(compoundAssignmentLHSIsReference.ts, 7, 13))

    x2 *= value;
>x2 : Symbol(x2, Decl(compoundAssignmentLHSIsReference.ts, 7, 13))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

    x2 += value;
>x2 : Symbol(x2, Decl(compoundAssignmentLHSIsReference.ts, 7, 13))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))
}

// property accesses
var x3: { a: number };
>x3 : Symbol(x3, Decl(compoundAssignmentLHSIsReference.ts, 13, 3))
>a : Symbol(a, Decl(compoundAssignmentLHSIsReference.ts, 13, 9))

x3.a *= value;
>x3.a : Symbol(a, Decl(compoundAssignmentLHSIsReference.ts, 13, 9))
>x3 : Symbol(x3, Decl(compoundAssignmentLHSIsReference.ts, 13, 3))
>a : Symbol(a, Decl(compoundAssignmentLHSIsReference.ts, 13, 9))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

x3.a += value;
>x3.a : Symbol(a, Decl(compoundAssignmentLHSIsReference.ts, 13, 9))
>x3 : Symbol(x3, Decl(compoundAssignmentLHSIsReference.ts, 13, 3))
>a : Symbol(a, Decl(compoundAssignmentLHSIsReference.ts, 13, 9))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

x3['a'] *= value;
>x3 : Symbol(x3, Decl(compoundAssignmentLHSIsReference.ts, 13, 3))
>'a' : Symbol(a, Decl(compoundAssignmentLHSIsReference.ts, 13, 9))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

x3['a'] += value;
>x3 : Symbol(x3, Decl(compoundAssignmentLHSIsReference.ts, 13, 3))
>'a' : Symbol(a, Decl(compoundAssignmentLHSIsReference.ts, 13, 9))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

// parentheses, the contained expression is reference
(x1) *= value;
>x1 : Symbol(x1, Decl(compoundAssignmentLHSIsReference.ts, 3, 3))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

(x1) += value;
>x1 : Symbol(x1, Decl(compoundAssignmentLHSIsReference.ts, 3, 3))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

function fn2(x4: number) {
>fn2 : Symbol(fn2, Decl(compoundAssignmentLHSIsReference.ts, 22, 14))
>x4 : Symbol(x4, Decl(compoundAssignmentLHSIsReference.ts, 24, 13))

    (x4) *= value;
>x4 : Symbol(x4, Decl(compoundAssignmentLHSIsReference.ts, 24, 13))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

    (x4) += value;
>x4 : Symbol(x4, Decl(compoundAssignmentLHSIsReference.ts, 24, 13))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))
}

(x3.a) *= value;
>x3.a : Symbol(a, Decl(compoundAssignmentLHSIsReference.ts, 13, 9))
>x3 : Symbol(x3, Decl(compoundAssignmentLHSIsReference.ts, 13, 3))
>a : Symbol(a, Decl(compoundAssignmentLHSIsReference.ts, 13, 9))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

(x3.a) += value;
>x3.a : Symbol(a, Decl(compoundAssignmentLHSIsReference.ts, 13, 9))
>x3 : Symbol(x3, Decl(compoundAssignmentLHSIsReference.ts, 13, 3))
>a : Symbol(a, Decl(compoundAssignmentLHSIsReference.ts, 13, 9))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

(x3['a']) *= value;
>x3 : Symbol(x3, Decl(compoundAssignmentLHSIsReference.ts, 13, 3))
>'a' : Symbol(a, Decl(compoundAssignmentLHSIsReference.ts, 13, 9))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))

(x3['a']) += value;
>x3 : Symbol(x3, Decl(compoundAssignmentLHSIsReference.ts, 13, 3))
>'a' : Symbol(a, Decl(compoundAssignmentLHSIsReference.ts, 13, 9))
>value : Symbol(value, Decl(compoundAssignmentLHSIsReference.ts, 0, 3))