mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-09 16:39:46 -05:00
Update baselines for exponentiation compound operator with indexing and property assignment
This commit is contained in:
@@ -36,8 +36,8 @@ function fn1(x2) {
|
||||
}
|
||||
// property accesses
|
||||
var x3;
|
||||
x3.a = Math.pow(x3.a, value);
|
||||
x3['a'] = Math.pow(x3['a'], value);
|
||||
_a = x3, _a.a = Math.pow(_a.a, value);
|
||||
_b = x3, _b['a'] = Math.pow(_b['a'], value);
|
||||
// parentheses, the contained expression is reference
|
||||
(x1) = Math.pow((x1), value);
|
||||
function fn2(x4) {
|
||||
@@ -45,3 +45,4 @@ function fn2(x4) {
|
||||
}
|
||||
(x3.a) = Math.pow((x3.a), value);
|
||||
(x3['a']) = Math.pow((x3['a']), value);
|
||||
var _a, _b;
|
||||
|
||||
@@ -140,13 +140,16 @@ var Derived = (function (_super) {
|
||||
__extends(Derived, _super);
|
||||
function Derived() {
|
||||
_super.call(this);
|
||||
_super.prototype. = Math.pow(_super.prototype., value);
|
||||
_a = _super.prototype, _a. = Math.pow(_a., value);
|
||||
var _a;
|
||||
}
|
||||
Derived.prototype.foo = function () {
|
||||
_super.prototype. = Math.pow(_super.prototype., value);
|
||||
_a = _super.prototype, _a. = Math.pow(_a., value);
|
||||
var _a;
|
||||
};
|
||||
Derived.sfoo = function () {
|
||||
_super. = Math.pow(_super., value);
|
||||
_a = _super, _a. = Math.pow(_a., value);
|
||||
var _a;
|
||||
};
|
||||
return Derived;
|
||||
})(C);
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts]
|
||||
|
||||
var array0 = [1, 2, 3]
|
||||
var i0 = 0;
|
||||
array0[++i0] **= 2;
|
||||
|
||||
var array1 = [1, 2, 3]
|
||||
var i1 = 0;
|
||||
array1[++i1] **= array1[++i1] **= 2;
|
||||
|
||||
var array2 = [1, 2, 3]
|
||||
var i2 = 0;
|
||||
array2[++i2] **= array2[++i2] ** 2;
|
||||
|
||||
var array3 = [2, 2, 3];
|
||||
var j0 = 0, j1 = 1;
|
||||
array3[j0++] **= array3[j1++] **= array3[j0++] **= 1;
|
||||
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS1.js]
|
||||
var array0 = [1, 2, 3];
|
||||
var i0 = 0;
|
||||
_a = array0, _i = ++i0, _a[_i] = Math.pow(_a[_i], 2);
|
||||
var array1 = [1, 2, 3];
|
||||
var i1 = 0;
|
||||
_b = array1, _c = ++i1, _b[_c] = Math.pow(_b[_c], (_d = array1, _e = ++i1, _d[_e] = Math.pow(_d[_e], 2)));
|
||||
var array2 = [1, 2, 3];
|
||||
var i2 = 0;
|
||||
_f = array2, _g = ++i2, _f[_g] = Math.pow(_f[_g], Math.pow(array2[++i2], 2));
|
||||
var array3 = [2, 2, 3];
|
||||
var j0 = 0, j1 = 1;
|
||||
_h = array3, _j = j0++, _h[_j] = Math.pow(_h[_j], (_k = array3, _l = j1++, _k[_l] = Math.pow(_k[_l], (_m = array3, _o = j0++, _m[_o] = Math.pow(_m[_o], 1)))));
|
||||
var _a, _i, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
||||
@@ -0,0 +1,51 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts ===
|
||||
|
||||
var array0 = [1, 2, 3]
|
||||
>array0 : Symbol(array0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 1, 3))
|
||||
|
||||
var i0 = 0;
|
||||
>i0 : Symbol(i0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 2, 3))
|
||||
|
||||
array0[++i0] **= 2;
|
||||
>array0 : Symbol(array0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 1, 3))
|
||||
>i0 : Symbol(i0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 2, 3))
|
||||
|
||||
var array1 = [1, 2, 3]
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 5, 3))
|
||||
|
||||
var i1 = 0;
|
||||
>i1 : Symbol(i1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 6, 3))
|
||||
|
||||
array1[++i1] **= array1[++i1] **= 2;
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 5, 3))
|
||||
>i1 : Symbol(i1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 6, 3))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 5, 3))
|
||||
>i1 : Symbol(i1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 6, 3))
|
||||
|
||||
var array2 = [1, 2, 3]
|
||||
>array2 : Symbol(array2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 9, 3))
|
||||
|
||||
var i2 = 0;
|
||||
>i2 : Symbol(i2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 10, 3))
|
||||
|
||||
array2[++i2] **= array2[++i2] ** 2;
|
||||
>array2 : Symbol(array2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 9, 3))
|
||||
>i2 : Symbol(i2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 10, 3))
|
||||
>array2 : Symbol(array2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 9, 3))
|
||||
>i2 : Symbol(i2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 10, 3))
|
||||
|
||||
var array3 = [2, 2, 3];
|
||||
>array3 : Symbol(array3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 13, 3))
|
||||
|
||||
var j0 = 0, j1 = 1;
|
||||
>j0 : Symbol(j0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 3))
|
||||
>j1 : Symbol(j1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 11))
|
||||
|
||||
array3[j0++] **= array3[j1++] **= array3[j0++] **= 1;
|
||||
>array3 : Symbol(array3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 13, 3))
|
||||
>j0 : Symbol(j0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 3))
|
||||
>array3 : Symbol(array3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 13, 3))
|
||||
>j1 : Symbol(j1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 11))
|
||||
>array3 : Symbol(array3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 13, 3))
|
||||
>j0 : Symbol(j0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 3))
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts ===
|
||||
|
||||
var array0 = [1, 2, 3]
|
||||
>array0 : number[]
|
||||
>[1, 2, 3] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
var i0 = 0;
|
||||
>i0 : number
|
||||
>0 : number
|
||||
|
||||
array0[++i0] **= 2;
|
||||
>array0[++i0] **= 2 : number
|
||||
>array0[++i0] : number
|
||||
>array0 : number[]
|
||||
>++i0 : number
|
||||
>i0 : number
|
||||
>2 : number
|
||||
|
||||
var array1 = [1, 2, 3]
|
||||
>array1 : number[]
|
||||
>[1, 2, 3] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
var i1 = 0;
|
||||
>i1 : number
|
||||
>0 : number
|
||||
|
||||
array1[++i1] **= array1[++i1] **= 2;
|
||||
>array1[++i1] **= array1[++i1] **= 2 : number
|
||||
>array1[++i1] : number
|
||||
>array1 : number[]
|
||||
>++i1 : number
|
||||
>i1 : number
|
||||
>array1[++i1] **= 2 : number
|
||||
>array1[++i1] : number
|
||||
>array1 : number[]
|
||||
>++i1 : number
|
||||
>i1 : number
|
||||
>2 : number
|
||||
|
||||
var array2 = [1, 2, 3]
|
||||
>array2 : number[]
|
||||
>[1, 2, 3] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
var i2 = 0;
|
||||
>i2 : number
|
||||
>0 : number
|
||||
|
||||
array2[++i2] **= array2[++i2] ** 2;
|
||||
>array2[++i2] **= array2[++i2] ** 2 : number
|
||||
>array2[++i2] : number
|
||||
>array2 : number[]
|
||||
>++i2 : number
|
||||
>i2 : number
|
||||
>array2[++i2] ** 2 : number
|
||||
>array2[++i2] : number
|
||||
>array2 : number[]
|
||||
>++i2 : number
|
||||
>i2 : number
|
||||
>2 : number
|
||||
|
||||
var array3 = [2, 2, 3];
|
||||
>array3 : number[]
|
||||
>[2, 2, 3] : number[]
|
||||
>2 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
var j0 = 0, j1 = 1;
|
||||
>j0 : number
|
||||
>0 : number
|
||||
>j1 : number
|
||||
>1 : number
|
||||
|
||||
array3[j0++] **= array3[j1++] **= array3[j0++] **= 1;
|
||||
>array3[j0++] **= array3[j1++] **= array3[j0++] **= 1 : number
|
||||
>array3[j0++] : number
|
||||
>array3 : number[]
|
||||
>j0++ : number
|
||||
>j0 : number
|
||||
>array3[j1++] **= array3[j0++] **= 1 : number
|
||||
>array3[j1++] : number
|
||||
>array3 : number[]
|
||||
>j1++ : number
|
||||
>j1 : number
|
||||
>array3[j0++] **= 1 : number
|
||||
>array3[j0++] : number
|
||||
>array3 : number[]
|
||||
>j0++ : number
|
||||
>j0 : number
|
||||
>1 : number
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts]
|
||||
var globalCounter = 0;
|
||||
function foo() {
|
||||
globalCounter += 1;
|
||||
return { 0: 2 };
|
||||
}
|
||||
foo()[0] **= foo()[0];
|
||||
var result_foo1 = foo()[0] **= foo()[0];
|
||||
foo()[0] **= foo()[0] **= 2;
|
||||
var result_foo2 = foo()[0] **= foo()[0] **= 2;
|
||||
foo()[0] **= foo()[0] ** 2;
|
||||
var result_foo3 = foo()[0] **= foo()[0] ** 2;
|
||||
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS2.js]
|
||||
var globalCounter = 0;
|
||||
function foo() {
|
||||
globalCounter += 1;
|
||||
return { 0: 2 };
|
||||
}
|
||||
_a = foo(), _a[0] = Math.pow(_a[0], foo()[0]);
|
||||
var result_foo1 = (_b = foo(), _b[0] = Math.pow(_b[0], foo()[0]));
|
||||
_c = foo(), _c[0] = Math.pow(_c[0], (_d = foo(), _d[0] = Math.pow(_d[0], 2)));
|
||||
var result_foo2 = (_e = foo(), _e[0] = Math.pow(_e[0], (_f = foo(), _f[0] = Math.pow(_f[0], 2))));
|
||||
_g = foo(), _g[0] = Math.pow(_g[0], Math.pow(foo()[0], 2));
|
||||
var result_foo3 = (_h = foo(), _h[0] = Math.pow(_h[0], Math.pow(foo()[0], 2)));
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
||||
@@ -0,0 +1,51 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts ===
|
||||
var globalCounter = 0;
|
||||
>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 3))
|
||||
|
||||
function foo() {
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
|
||||
globalCounter += 1;
|
||||
>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 3))
|
||||
|
||||
return { 0: 2 };
|
||||
}
|
||||
foo()[0] **= foo()[0];
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
|
||||
var result_foo1 = foo()[0] **= foo()[0];
|
||||
>result_foo1 : Symbol(result_foo1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 6, 3))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
|
||||
foo()[0] **= foo()[0] **= 2;
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
|
||||
var result_foo2 = foo()[0] **= foo()[0] **= 2;
|
||||
>result_foo2 : Symbol(result_foo2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 8, 3))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
|
||||
foo()[0] **= foo()[0] ** 2;
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
|
||||
var result_foo3 = foo()[0] **= foo()[0] ** 2;
|
||||
>result_foo3 : Symbol(result_foo3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 10, 3))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts ===
|
||||
var globalCounter = 0;
|
||||
>globalCounter : number
|
||||
>0 : number
|
||||
|
||||
function foo() {
|
||||
>foo : () => { 0: number; }
|
||||
|
||||
globalCounter += 1;
|
||||
>globalCounter += 1 : number
|
||||
>globalCounter : number
|
||||
>1 : number
|
||||
|
||||
return { 0: 2 };
|
||||
>{ 0: 2 } : { 0: number; }
|
||||
>2 : number
|
||||
}
|
||||
foo()[0] **= foo()[0];
|
||||
>foo()[0] **= foo()[0] : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
|
||||
var result_foo1 = foo()[0] **= foo()[0];
|
||||
>result_foo1 : number
|
||||
>foo()[0] **= foo()[0] : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
|
||||
foo()[0] **= foo()[0] **= 2;
|
||||
>foo()[0] **= foo()[0] **= 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>foo()[0] **= 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>2 : number
|
||||
|
||||
var result_foo2 = foo()[0] **= foo()[0] **= 2;
|
||||
>result_foo2 : number
|
||||
>foo()[0] **= foo()[0] **= 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>foo()[0] **= 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>2 : number
|
||||
|
||||
foo()[0] **= foo()[0] ** 2;
|
||||
>foo()[0] **= foo()[0] ** 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>foo()[0] ** 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>2 : number
|
||||
|
||||
var result_foo3 = foo()[0] **= foo()[0] ** 2;
|
||||
>result_foo3 : number
|
||||
>foo()[0] **= foo()[0] ** 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>foo()[0] ** 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>2 : number
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts]
|
||||
|
||||
var object = {
|
||||
_0: 2,
|
||||
get 0() {
|
||||
return this._0;
|
||||
},
|
||||
set 0(x: number) {
|
||||
this._0 = x;
|
||||
},
|
||||
}
|
||||
object[0] **= object[0];
|
||||
object[0] **= object[0] **= 2;
|
||||
object[0] **= object[0] ** 2;
|
||||
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS3.js]
|
||||
var object = {
|
||||
_0: 2,
|
||||
get 0() {
|
||||
return this._0;
|
||||
},
|
||||
set 0(x) {
|
||||
this._0 = x;
|
||||
},
|
||||
};
|
||||
_a = object, _a[0] = Math.pow(_a[0], object[0]);
|
||||
_b = object, _b[0] = Math.pow(_b[0], (_c = object, _c[0] = Math.pow(_c[0], 2)));
|
||||
_d = object, _d[0] = Math.pow(_d[0], Math.pow(object[0], 2));
|
||||
var _a, _b, _c, _d;
|
||||
@@ -0,0 +1,37 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts ===
|
||||
|
||||
var object = {
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
|
||||
_0: 2,
|
||||
>_0 : Symbol(_0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 14))
|
||||
|
||||
get 0() {
|
||||
return this._0;
|
||||
},
|
||||
set 0(x: number) {
|
||||
>x : Symbol(x, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 6, 10))
|
||||
|
||||
this._0 = x;
|
||||
>x : Symbol(x, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 6, 10))
|
||||
|
||||
},
|
||||
}
|
||||
object[0] **= object[0];
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6))
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6))
|
||||
|
||||
object[0] **= object[0] **= 2;
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6))
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6))
|
||||
|
||||
object[0] **= object[0] ** 2;
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6))
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6))
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts ===
|
||||
|
||||
var object = {
|
||||
>object : { 0: number; _0: number; }
|
||||
>{ _0: 2, get 0() { return this._0; }, set 0(x: number) { this._0 = x; },} : { 0: number; _0: number; }
|
||||
|
||||
_0: 2,
|
||||
>_0 : number
|
||||
>2 : number
|
||||
|
||||
get 0() {
|
||||
return this._0;
|
||||
>this._0 : any
|
||||
>this : any
|
||||
>_0 : any
|
||||
|
||||
},
|
||||
set 0(x: number) {
|
||||
>x : number
|
||||
|
||||
this._0 = x;
|
||||
>this._0 = x : number
|
||||
>this._0 : any
|
||||
>this : any
|
||||
>_0 : any
|
||||
>x : number
|
||||
|
||||
},
|
||||
}
|
||||
object[0] **= object[0];
|
||||
>object[0] **= object[0] : number
|
||||
>object[0] : number
|
||||
>object : { 0: number; _0: number; }
|
||||
>0 : number
|
||||
>object[0] : number
|
||||
>object : { 0: number; _0: number; }
|
||||
>0 : number
|
||||
|
||||
object[0] **= object[0] **= 2;
|
||||
>object[0] **= object[0] **= 2 : number
|
||||
>object[0] : number
|
||||
>object : { 0: number; _0: number; }
|
||||
>0 : number
|
||||
>object[0] **= 2 : number
|
||||
>object[0] : number
|
||||
>object : { 0: number; _0: number; }
|
||||
>0 : number
|
||||
>2 : number
|
||||
|
||||
object[0] **= object[0] ** 2;
|
||||
>object[0] **= object[0] ** 2 : number
|
||||
>object[0] : number
|
||||
>object : { 0: number; _0: number; }
|
||||
>0 : number
|
||||
>object[0] ** 2 : number
|
||||
>object[0] : number
|
||||
>object : { 0: number; _0: number; }
|
||||
>0 : number
|
||||
>2 : number
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts]
|
||||
|
||||
var globalCounter = 0;
|
||||
function incrementIdx(max: number) {
|
||||
globalCounter += 1;
|
||||
let idx = Math.floor(Math.random() * max);
|
||||
return idx;
|
||||
}
|
||||
|
||||
var array1 = [1, 2, 3, 4, 5];
|
||||
|
||||
array1[incrementIdx(array1.length)] **= 3;
|
||||
|
||||
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2;
|
||||
|
||||
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2;
|
||||
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS4.js]
|
||||
var globalCounter = 0;
|
||||
function incrementIdx(max) {
|
||||
globalCounter += 1;
|
||||
var idx = Math.floor(Math.random() * max);
|
||||
return idx;
|
||||
}
|
||||
var array1 = [1, 2, 3, 4, 5];
|
||||
_a = array1, _i = incrementIdx(array1.length), _a[_i] = Math.pow(_a[_i], 3);
|
||||
_b = array1, _c = incrementIdx(array1.length), _b[_c] = Math.pow(_b[_c], (_d = array1, _e = incrementIdx(array1.length), _d[_e] = Math.pow(_d[_e], 2)));
|
||||
_f = array1, _g = incrementIdx(array1.length), _f[_g] = Math.pow(_f[_g], Math.pow(array1[incrementIdx(array1.length)], 2));
|
||||
var _a, _i, _b, _c, _d, _e, _f, _g;
|
||||
@@ -0,0 +1,60 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts ===
|
||||
|
||||
var globalCounter = 0;
|
||||
>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 3))
|
||||
|
||||
function incrementIdx(max: number) {
|
||||
>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22))
|
||||
>max : Symbol(max, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 2, 22))
|
||||
|
||||
globalCounter += 1;
|
||||
>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 3))
|
||||
|
||||
let idx = Math.floor(Math.random() * max);
|
||||
>idx : Symbol(idx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 4, 7))
|
||||
>Math.floor : Symbol(Math.floor, Decl(lib.d.ts, 582, 27))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11))
|
||||
>floor : Symbol(Math.floor, Decl(lib.d.ts, 582, 27))
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, 522, 1), Decl(lib.d.ts, 633, 11))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, 608, 38))
|
||||
>max : Symbol(max, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 2, 22))
|
||||
|
||||
return idx;
|
||||
>idx : Symbol(idx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 4, 7))
|
||||
}
|
||||
|
||||
var array1 = [1, 2, 3, 4, 5];
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
|
||||
array1[incrementIdx(array1.length)] **= 3;
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22))
|
||||
>array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
|
||||
|
||||
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2;
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22))
|
||||
>array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22))
|
||||
>array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
|
||||
|
||||
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2;
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22))
|
||||
>array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22))
|
||||
>array1.length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>length : Symbol(Array.length, Decl(lib.d.ts, 1007, 20))
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts ===
|
||||
|
||||
var globalCounter = 0;
|
||||
>globalCounter : number
|
||||
>0 : number
|
||||
|
||||
function incrementIdx(max: number) {
|
||||
>incrementIdx : (max: number) => number
|
||||
>max : number
|
||||
|
||||
globalCounter += 1;
|
||||
>globalCounter += 1 : number
|
||||
>globalCounter : number
|
||||
>1 : number
|
||||
|
||||
let idx = Math.floor(Math.random() * max);
|
||||
>idx : number
|
||||
>Math.floor(Math.random() * max) : number
|
||||
>Math.floor : (x: number) => number
|
||||
>Math : Math
|
||||
>floor : (x: number) => number
|
||||
>Math.random() * max : number
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
>Math : Math
|
||||
>random : () => number
|
||||
>max : number
|
||||
|
||||
return idx;
|
||||
>idx : number
|
||||
}
|
||||
|
||||
var array1 = [1, 2, 3, 4, 5];
|
||||
>array1 : number[]
|
||||
>[1, 2, 3, 4, 5] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
>4 : number
|
||||
>5 : number
|
||||
|
||||
array1[incrementIdx(array1.length)] **= 3;
|
||||
>array1[incrementIdx(array1.length)] **= 3 : number
|
||||
>array1[incrementIdx(array1.length)] : number
|
||||
>array1 : number[]
|
||||
>incrementIdx(array1.length) : number
|
||||
>incrementIdx : (max: number) => number
|
||||
>array1.length : number
|
||||
>array1 : number[]
|
||||
>length : number
|
||||
>3 : number
|
||||
|
||||
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2;
|
||||
>array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2 : number
|
||||
>array1[incrementIdx(array1.length)] : number
|
||||
>array1 : number[]
|
||||
>incrementIdx(array1.length) : number
|
||||
>incrementIdx : (max: number) => number
|
||||
>array1.length : number
|
||||
>array1 : number[]
|
||||
>length : number
|
||||
>array1[incrementIdx(array1.length)] **= 2 : number
|
||||
>array1[incrementIdx(array1.length)] : number
|
||||
>array1 : number[]
|
||||
>incrementIdx(array1.length) : number
|
||||
>incrementIdx : (max: number) => number
|
||||
>array1.length : number
|
||||
>array1 : number[]
|
||||
>length : number
|
||||
>2 : number
|
||||
|
||||
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2;
|
||||
>array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2 : number
|
||||
>array1[incrementIdx(array1.length)] : number
|
||||
>array1 : number[]
|
||||
>incrementIdx(array1.length) : number
|
||||
>incrementIdx : (max: number) => number
|
||||
>array1.length : number
|
||||
>array1 : number[]
|
||||
>length : number
|
||||
>array1[incrementIdx(array1.length)] ** 2 : number
|
||||
>array1[incrementIdx(array1.length)] : number
|
||||
>array1 : number[]
|
||||
>incrementIdx(array1.length) : number
|
||||
>incrementIdx : (max: number) => number
|
||||
>array1.length : number
|
||||
>array1 : number[]
|
||||
>length : number
|
||||
>2 : number
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
//// [emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts]
|
||||
|
||||
var globalCounter = 0;
|
||||
function foo() {
|
||||
globalCounter += 1;
|
||||
return { prop: 2 };
|
||||
}
|
||||
foo().prop **= 2;
|
||||
var result0 = foo().prop **= 2;
|
||||
foo().prop **= foo().prop **= 2;
|
||||
var result1 = foo().prop **= foo().prop **= 2;
|
||||
foo().prop **= foo().prop ** 2;
|
||||
var result2 = foo().prop **= foo().prop ** 2;
|
||||
|
||||
//// [emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.js]
|
||||
var globalCounter = 0;
|
||||
function foo() {
|
||||
globalCounter += 1;
|
||||
return { prop: 2 };
|
||||
}
|
||||
_a = foo(), _a.prop = Math.pow(_a.prop, 2);
|
||||
var result0 = (_b = foo(), _b.prop = Math.pow(_b.prop, 2));
|
||||
_c = foo(), _c.prop = Math.pow(_c.prop, (_d = foo(), _d.prop = Math.pow(_d.prop, 2)));
|
||||
var result1 = (_e = foo(), _e.prop = Math.pow(_e.prop, (_f = foo(), _f.prop = Math.pow(_f.prop, 2))));
|
||||
_g = foo(), _g.prop = Math.pow(_g.prop, Math.pow(foo().prop, 2));
|
||||
var result2 = (_h = foo(), _h.prop = Math.pow(_h.prop, Math.pow(foo().prop, 2)));
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
||||
@@ -0,0 +1,59 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts ===
|
||||
|
||||
var globalCounter = 0;
|
||||
>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 3))
|
||||
|
||||
function foo() {
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
|
||||
globalCounter += 1;
|
||||
>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 3))
|
||||
|
||||
return { prop: 2 };
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
}
|
||||
foo().prop **= 2;
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
|
||||
var result0 = foo().prop **= 2;
|
||||
>result0 : Symbol(result0, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 7, 3))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
|
||||
foo().prop **= foo().prop **= 2;
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
|
||||
var result1 = foo().prop **= foo().prop **= 2;
|
||||
>result1 : Symbol(result1, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 9, 3))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
|
||||
foo().prop **= foo().prop ** 2;
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
|
||||
var result2 = foo().prop **= foo().prop ** 2;
|
||||
>result2 : Symbol(result2, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 11, 3))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts ===
|
||||
|
||||
var globalCounter = 0;
|
||||
>globalCounter : number
|
||||
>0 : number
|
||||
|
||||
function foo() {
|
||||
>foo : () => { prop: number; }
|
||||
|
||||
globalCounter += 1;
|
||||
>globalCounter += 1 : number
|
||||
>globalCounter : number
|
||||
>1 : number
|
||||
|
||||
return { prop: 2 };
|
||||
>{ prop: 2 } : { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
}
|
||||
foo().prop **= 2;
|
||||
>foo().prop **= 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
|
||||
var result0 = foo().prop **= 2;
|
||||
>result0 : number
|
||||
>foo().prop **= 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
|
||||
foo().prop **= foo().prop **= 2;
|
||||
>foo().prop **= foo().prop **= 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>foo().prop **= 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
|
||||
var result1 = foo().prop **= foo().prop **= 2;
|
||||
>result1 : number
|
||||
>foo().prop **= foo().prop **= 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>foo().prop **= 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
|
||||
foo().prop **= foo().prop ** 2;
|
||||
>foo().prop **= foo().prop ** 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>foo().prop ** 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
|
||||
var result2 = foo().prop **= foo().prop ** 2;
|
||||
>result2 : number
|
||||
>foo().prop **= foo().prop ** 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>foo().prop ** 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
|
||||
Reference in New Issue
Block a user