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
|
//// [compoundExponentiationAssignmentLHSIsReference.ts]
var value: any;
// identifiers: variable and parameter
var x1: number;
x1 **= value;
function fn1(x2: number) {
x2 **= value;
}
// property accesses
var x3: { a: number };
x3.a **= value;
x3['a'] **= value;
// parentheses, the contained expression is reference
(x1) **= value;
function fn2(x4: number) {
(x4) **= value;
}
(x3.a) **= value;
(x3['a']) **= value;
//// [compoundExponentiationAssignmentLHSIsReference.js]
var _a, _b, _c;
var value;
// identifiers: variable and parameter
var x1;
x1 = Math.pow(x1, value);
function fn1(x2) {
x2 = Math.pow(x2, value);
}
// property accesses
var x3;
(_a = x3).a = Math.pow(_a.a, value);
(_b = x3)[_c = 'a'] = Math.pow(_b[_c], value);
// parentheses, the contained expression is reference
(x1) = Math.pow((x1), value);
function fn2(x4) {
(x4) = Math.pow((x4), value);
}
(x3.a) = Math.pow((x3.a), value);
(x3['a']) = Math.pow((x3['a']), value);
|