TypeScript/tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsReference.ts
Anders Hejlsberg b14b24a96e Update tests
2016-09-21 16:03:51 -07:00

26 lines
No EOL
376 B
TypeScript

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;