mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-06 20:14:01 -06:00
Add and update tests
This commit is contained in:
parent
80cdfd4187
commit
a00e90c170
@ -1,10 +1,12 @@
|
||||
// @target: es5
|
||||
var globalCounter = 0;
|
||||
function foo() {
|
||||
console.log("Call 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;
|
||||
@ -1,6 +1,8 @@
|
||||
// @target: es5
|
||||
|
||||
var globalCounter = 0;
|
||||
function incrementIdx(max: number) {
|
||||
globalCounter += 1;
|
||||
let idx = Math.floor(Math.random() * max);
|
||||
return idx;
|
||||
}
|
||||
|
||||
@ -1,6 +1,13 @@
|
||||
// @target: es5
|
||||
|
||||
var globalCounter = 0;
|
||||
function foo() {
|
||||
globalCounter += 1;
|
||||
return { prop: 2 };
|
||||
}
|
||||
foo().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;
|
||||
@ -1,4 +1,4 @@
|
||||
// @target:es7
|
||||
// @target: es7
|
||||
|
||||
var comp: number;
|
||||
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
// @target: es5
|
||||
|
||||
1 ** -2;
|
||||
1 ** 2;
|
||||
(-1) ** 2
|
||||
1 ** 2 ** 3;
|
||||
1 ** -2 ** 3;
|
||||
1 ** -2 ** -3;
|
||||
-1 ** -2 ** -3;
|
||||
-(1 ** 2) ** 3;
|
||||
1 ** 2 ** -3;
|
||||
1 ** -(2 ** 3);
|
||||
(-(1 ** 2)) ** 3;
|
||||
(-(1 ** 2)) ** -3;
|
||||
|
||||
1 ** 2 + 3;
|
||||
1 ** 2 - 3;
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
// @target: es7
|
||||
|
||||
1 ** -2;
|
||||
1 ** 2;
|
||||
(-1) ** 2
|
||||
1 ** 2 ** 3;
|
||||
1 ** -2 ** 3;
|
||||
1 ** -2 ** -3;
|
||||
-1 ** -2 ** -3;
|
||||
-(1 ** 2) ** 3;
|
||||
1 ** 2 ** -3;
|
||||
1 ** -(2 ** 3);
|
||||
(-(1 ** 2)) ** 3;
|
||||
(-(1 ** 2)) ** -3;
|
||||
|
||||
1 ** 2 + 3;
|
||||
1 ** 2 - 3;
|
||||
|
||||
@ -11,13 +11,10 @@ temp-- ** 3;
|
||||
--temp * temp ** 3;
|
||||
--temp / temp ** 3;
|
||||
--temp % temp ** 3;
|
||||
-++temp ** 3;
|
||||
+--temp ** 3;
|
||||
|
||||
temp-- ** 3;
|
||||
temp++ ** 3;
|
||||
-temp++ ** 3;
|
||||
+temp-- ** 3;
|
||||
temp-- ** -temp;
|
||||
temp++ ** +temp;
|
||||
|
||||
temp-- + temp ** 3;
|
||||
temp-- - temp ** 3;
|
||||
@ -40,27 +37,11 @@ temp-- % temp ** 3;
|
||||
3 ** --temp;
|
||||
3 ** temp++;
|
||||
3 ** temp--;
|
||||
-3 ** temp++;
|
||||
-3 ** temp--;
|
||||
-3 ** ++temp;
|
||||
-3 ** --temp;
|
||||
+3 ** temp++;
|
||||
+3 ** temp--;
|
||||
+3 ** ++temp;
|
||||
+3 ** --temp
|
||||
|
||||
3 ** ++temp ** 2;
|
||||
3 ** --temp ** 2;
|
||||
3 ** temp++ ** 2;
|
||||
3 ** temp-- ** 2;
|
||||
-3 ** temp++ ** 2;
|
||||
-3 ** temp-- ** 2;
|
||||
-3 ** ++temp ** 2;
|
||||
-3 ** --temp ** 2;
|
||||
+3 ** temp++ ** 2;
|
||||
+3 ** temp-- ** 2;
|
||||
+3 ** ++temp ** 2;
|
||||
+3 ** --temp ** 2;
|
||||
|
||||
3 ** ++temp + 2;
|
||||
3 ** ++temp - 2;
|
||||
|
||||
@ -11,13 +11,10 @@ temp-- ** 3;
|
||||
--temp * temp ** 3;
|
||||
--temp / temp ** 3;
|
||||
--temp % temp ** 3;
|
||||
-++temp ** 3;
|
||||
+--temp ** 3;
|
||||
|
||||
temp-- ** 3;
|
||||
temp++ ** 3;
|
||||
-temp++ ** 3;
|
||||
+temp-- ** 3;
|
||||
temp-- ** -temp;
|
||||
temp++ ** +temp;
|
||||
|
||||
temp-- + temp ** 3;
|
||||
temp-- - temp ** 3;
|
||||
@ -40,27 +37,11 @@ temp-- % temp ** 3;
|
||||
3 ** --temp;
|
||||
3 ** temp++;
|
||||
3 ** temp--;
|
||||
-3 ** temp++;
|
||||
-3 ** temp--;
|
||||
-3 ** ++temp;
|
||||
-3 ** --temp;
|
||||
+3 ** temp++;
|
||||
+3 ** temp--;
|
||||
+3 ** ++temp;
|
||||
+3 ** --temp
|
||||
|
||||
3 ** ++temp ** 2;
|
||||
3 ** --temp ** 2;
|
||||
3 ** temp++ ** 2;
|
||||
3 ** temp-- ** 2;
|
||||
-3 ** temp++ ** 2;
|
||||
-3 ** temp-- ** 2;
|
||||
-3 ** ++temp ** 2;
|
||||
-3 ** --temp ** 2;
|
||||
+3 ** temp++ ** 2;
|
||||
+3 ** temp-- ** 2;
|
||||
+3 ** ++temp ** 2;
|
||||
+3 ** --temp ** 2;
|
||||
|
||||
3 ** ++temp + 2;
|
||||
3 ** ++temp - 2;
|
||||
|
||||
@ -1,114 +1,40 @@
|
||||
// @target: es5
|
||||
var temp: any;
|
||||
// @target:es5
|
||||
|
||||
delete --temp ** 3;
|
||||
delete ++temp ** 3;
|
||||
delete temp-- ** 3;
|
||||
delete temp++ ** 3;
|
||||
delete -++temp ** 3;
|
||||
delete -temp++ ** 3;
|
||||
delete -temp-- ** 3;
|
||||
var temp = 10;
|
||||
|
||||
delete --temp ** 3 ** 1;
|
||||
delete ++temp ** 3 ** 1;
|
||||
delete temp-- ** 3 ** 1;
|
||||
delete temp++ ** 3 ** 1;
|
||||
delete -++temp ** 3 ** 1;
|
||||
delete -temp++ ** 3 ** 1;
|
||||
delete -temp-- ** 3 ** 1;;
|
||||
(-++temp) ** 3;
|
||||
(+--temp) ** 3;
|
||||
(-temp++) ** 3;
|
||||
(+temp--) ** 3;
|
||||
(-(1 ** ++temp)) ** 3;
|
||||
(-(1 ** --temp)) ** 3;
|
||||
(-(1 ** temp++)) ** 3;
|
||||
(-(1 ** temp--)) ** 3;
|
||||
|
||||
<number>--temp ** 3;
|
||||
<number>++temp ** 3;
|
||||
<number>temp-- ** 3;
|
||||
<number>temp++ ** 3;
|
||||
<number>-++temp ** 3;
|
||||
<number>-temp++ ** 3;
|
||||
<number>-temp-- ** 3;
|
||||
(-3) ** temp++;
|
||||
(-3) ** temp--;
|
||||
(-3) ** ++temp;
|
||||
(-3) ** --temp;
|
||||
(+3) ** temp++;
|
||||
(+3) ** temp--;
|
||||
(+3) ** ++temp;
|
||||
(+3) ** --temp;
|
||||
(-3) ** temp++ ** 2;
|
||||
(-3) ** temp-- ** 2;
|
||||
(-3) ** ++temp ** 2;
|
||||
(-3) ** --temp ** 2;
|
||||
(+3) ** temp++ ** 2;
|
||||
(+3) ** temp-- ** 2;
|
||||
(+3) ** ++temp ** 2;
|
||||
(+3) ** --temp ** 2;
|
||||
|
||||
<number>--temp ** 3 ** 1;
|
||||
<number>++temp ** 3 ** 1;
|
||||
<number>temp-- ** 3 ** 1;
|
||||
<number>temp++ ** 3 ** 1;
|
||||
<number>-++temp ** 3 ** 1;
|
||||
<number>-temp++ ** 3 ** 1;
|
||||
<number>-temp-- ** 3 ** 1;
|
||||
|
||||
typeof --temp ** 3;
|
||||
typeof temp-- ** 3;
|
||||
typeof 3 ** 4;
|
||||
typeof temp++ ** 4;
|
||||
typeof temp-- ** 4;
|
||||
typeof -3 ** 4;
|
||||
typeof -++temp ** 4;
|
||||
typeof -temp++ ** 4;
|
||||
typeof -temp-- ** 4;
|
||||
|
||||
typeof --temp ** 3 ** 1;
|
||||
typeof temp-- ** 3 ** 1;
|
||||
typeof 3 ** 4 ** 1;
|
||||
typeof temp++ ** 4 ** 1;
|
||||
typeof temp-- ** 4 ** 1;
|
||||
typeof -3 ** 4 ** 1;
|
||||
typeof -++temp ** 4 ** 1;
|
||||
typeof -temp++ ** 4 ** 1;
|
||||
typeof -temp-- ** 4 ** 1;
|
||||
|
||||
void --temp ** 3;
|
||||
void temp-- ** 3;
|
||||
void 3 ** 4;
|
||||
void temp++ ** 4;
|
||||
void temp-- ** 4;
|
||||
void -3 ** 4;
|
||||
void -++temp ** 4;
|
||||
void -temp++ ** 4;
|
||||
void -temp-- ** 4;
|
||||
|
||||
void --temp ** 3 ** 1;
|
||||
void temp-- ** 3 ** 1;
|
||||
void 3 ** 4 ** 1;
|
||||
void temp++ ** 4 ** 1;
|
||||
void temp-- ** 4 ** 1;
|
||||
void -3 ** 4 ** 1;
|
||||
void -++temp ** 4 ** 1;
|
||||
void -temp++ ** 4 ** 1;
|
||||
void -temp-- ** 4 ** 1;
|
||||
|
||||
~ --temp ** 3;
|
||||
~ temp-- ** 3;
|
||||
~ 3 ** 4;
|
||||
~ temp++ ** 4;
|
||||
~ temp-- ** 4;
|
||||
~ -3 ** 4;
|
||||
~ -++temp ** 4;
|
||||
~ -temp++ ** 4;
|
||||
~ -temp-- ** 4;
|
||||
|
||||
~ --temp ** 3 ** 1;
|
||||
~ temp-- ** 3 ** 1;
|
||||
~ 3 ** 4 ** 1;
|
||||
~ temp++ ** 4 ** 1;
|
||||
~ temp-- ** 4 ** 1;
|
||||
~ -3 ** 4 ** 1;
|
||||
~ -++temp ** 4 ** 1;
|
||||
~ -temp++ ** 4 ** 1;
|
||||
~ -temp-- ** 4 ** 1;
|
||||
|
||||
! --temp ** 3;
|
||||
! temp-- ** 3;
|
||||
! 3 ** 4;
|
||||
! temp++ ** 4;
|
||||
! temp-- ** 4;
|
||||
! -3 ** 4;
|
||||
! -++temp ** 4;
|
||||
! -temp++ ** 4;
|
||||
! -temp-- ** 4;
|
||||
|
||||
! --temp ** 3 ** 1;
|
||||
! temp-- ** 3 ** 1;
|
||||
! 3 ** 4 ** 1;
|
||||
! temp++ ** 4 ** 1;
|
||||
! temp-- ** 4 ** 1;
|
||||
! -3 ** 4 ** 1;
|
||||
! -++temp ** 4 ** 1;
|
||||
! -temp++ ** 4 ** 1;
|
||||
! -temp-- ** 4 ** 1;
|
||||
3 ** -temp++;
|
||||
3 ** -temp--;
|
||||
3 ** -++temp;
|
||||
3 ** +--temp;
|
||||
3 ** (-temp++) ** 2;
|
||||
3 ** (-temp--) ** 2;
|
||||
3 ** (+temp++) ** 2;
|
||||
3 ** (+temp--) ** 2;
|
||||
3 ** (-++temp) ** 2;
|
||||
3 ** (+--temp) ** 2;
|
||||
|
||||
@ -1,114 +1,40 @@
|
||||
// @target: es7
|
||||
var temp: any;
|
||||
// @target:es7
|
||||
|
||||
delete --temp ** 3;
|
||||
delete ++temp ** 3;
|
||||
delete temp-- ** 3;
|
||||
delete temp++ ** 3;
|
||||
delete -++temp ** 3;
|
||||
delete -temp++ ** 3;
|
||||
delete -temp-- ** 3;
|
||||
var temp = 10;
|
||||
|
||||
delete --temp ** 3 ** 1;
|
||||
delete ++temp ** 3 ** 1;
|
||||
delete temp-- ** 3 ** 1;
|
||||
delete temp++ ** 3 ** 1;
|
||||
delete -++temp ** 3 ** 1;
|
||||
delete -temp++ ** 3 ** 1;
|
||||
delete -temp-- ** 3 ** 1;;
|
||||
(-++temp) ** 3;
|
||||
(+--temp) ** 3;
|
||||
(-temp++) ** 3;
|
||||
(+temp--) ** 3;
|
||||
(-(1 ** ++temp)) ** 3;
|
||||
(-(1 ** --temp)) ** 3;
|
||||
(-(1 ** temp++)) ** 3;
|
||||
(-(1 ** temp--)) ** 3;
|
||||
|
||||
<number>--temp ** 3;
|
||||
<number>++temp ** 3;
|
||||
<number>temp-- ** 3;
|
||||
<number>temp++ ** 3;
|
||||
<number>-++temp ** 3;
|
||||
<number>-temp++ ** 3;
|
||||
<number>-temp-- ** 3;
|
||||
(-3) ** temp++;
|
||||
(-3) ** temp--;
|
||||
(-3) ** ++temp;
|
||||
(-3) ** --temp;
|
||||
(+3) ** temp++;
|
||||
(+3) ** temp--;
|
||||
(+3) ** ++temp;
|
||||
(+3) ** --temp;
|
||||
(-3) ** temp++ ** 2;
|
||||
(-3) ** temp-- ** 2;
|
||||
(-3) ** ++temp ** 2;
|
||||
(-3) ** --temp ** 2;
|
||||
(+3) ** temp++ ** 2;
|
||||
(+3) ** temp-- ** 2;
|
||||
(+3) ** ++temp ** 2;
|
||||
(+3) ** --temp ** 2;
|
||||
|
||||
<number>--temp ** 3 ** 1;
|
||||
<number>++temp ** 3 ** 1;
|
||||
<number>temp-- ** 3 ** 1;
|
||||
<number>temp++ ** 3 ** 1;
|
||||
<number>-++temp ** 3 ** 1;
|
||||
<number>-temp++ ** 3 ** 1;
|
||||
<number>-temp-- ** 3 ** 1;
|
||||
|
||||
typeof --temp ** 3;
|
||||
typeof temp-- ** 3;
|
||||
typeof 3 ** 4;
|
||||
typeof temp++ ** 4;
|
||||
typeof temp-- ** 4;
|
||||
typeof -3 ** 4;
|
||||
typeof -++temp ** 4;
|
||||
typeof -temp++ ** 4;
|
||||
typeof -temp-- ** 4;
|
||||
|
||||
typeof --temp ** 3 ** 1;
|
||||
typeof temp-- ** 3 ** 1;
|
||||
typeof 3 ** 4 ** 1;
|
||||
typeof temp++ ** 4 ** 1;
|
||||
typeof temp-- ** 4 ** 1;
|
||||
typeof -3 ** 4 ** 1;
|
||||
typeof -++temp ** 4 ** 1;
|
||||
typeof -temp++ ** 4 ** 1;
|
||||
typeof -temp-- ** 4 ** 1;
|
||||
|
||||
void --temp ** 3;
|
||||
void temp-- ** 3;
|
||||
void 3 ** 4;
|
||||
void temp++ ** 4;
|
||||
void temp-- ** 4;
|
||||
void -3 ** 4;
|
||||
void -++temp ** 4;
|
||||
void -temp++ ** 4;
|
||||
void -temp-- ** 4;
|
||||
|
||||
void --temp ** 3 ** 1;
|
||||
void temp-- ** 3 ** 1;
|
||||
void 3 ** 4 ** 1;
|
||||
void temp++ ** 4 ** 1;
|
||||
void temp-- ** 4 ** 1;
|
||||
void -3 ** 4 ** 1;
|
||||
void -++temp ** 4 ** 1;
|
||||
void -temp++ ** 4 ** 1;
|
||||
void -temp-- ** 4 ** 1;
|
||||
|
||||
~ --temp ** 3;
|
||||
~ temp-- ** 3;
|
||||
~ 3 ** 4;
|
||||
~ temp++ ** 4;
|
||||
~ temp-- ** 4;
|
||||
~ -3 ** 4;
|
||||
~ -++temp ** 4;
|
||||
~ -temp++ ** 4;
|
||||
~ -temp-- ** 4;
|
||||
|
||||
~ --temp ** 3 ** 1;
|
||||
~ temp-- ** 3 ** 1;
|
||||
~ 3 ** 4 ** 1;
|
||||
~ temp++ ** 4 ** 1;
|
||||
~ temp-- ** 4 ** 1;
|
||||
~ -3 ** 4 ** 1;
|
||||
~ -++temp ** 4 ** 1;
|
||||
~ -temp++ ** 4 ** 1;
|
||||
~ -temp-- ** 4 ** 1;
|
||||
|
||||
! --temp ** 3;
|
||||
! temp-- ** 3;
|
||||
! 3 ** 4;
|
||||
! temp++ ** 4;
|
||||
! temp-- ** 4;
|
||||
! -3 ** 4;
|
||||
! -++temp ** 4;
|
||||
! -temp++ ** 4;
|
||||
! -temp-- ** 4;
|
||||
|
||||
! --temp ** 3 ** 1;
|
||||
! temp-- ** 3 ** 1;
|
||||
! 3 ** 4 ** 1;
|
||||
! temp++ ** 4 ** 1;
|
||||
! temp-- ** 4 ** 1;
|
||||
! -3 ** 4 ** 1;
|
||||
! -++temp ** 4 ** 1;
|
||||
! -temp++ ** 4 ** 1;
|
||||
! -temp-- ** 4 ** 1;
|
||||
3 ** -temp++;
|
||||
3 ** -temp--;
|
||||
3 ** -++temp;
|
||||
3 ** +--temp;
|
||||
3 ** (-temp++) ** 2;
|
||||
3 ** (-temp--) ** 2;
|
||||
3 ** (+temp++) ** 2;
|
||||
3 ** (+temp--) ** 2;
|
||||
3 ** (-++temp) ** 2;
|
||||
3 ** (+--temp) ** 2;
|
||||
|
||||
@ -0,0 +1,37 @@
|
||||
// @target: es5
|
||||
var temp: any;
|
||||
|
||||
<number>--temp ** 3;
|
||||
<number>++temp ** 3;
|
||||
<number>temp-- ** 3;
|
||||
<number>temp++ ** 3;
|
||||
|
||||
1 ** <number>--temp ** 3;
|
||||
1 ** <number>++temp ** 3;
|
||||
1 ** <number>temp-- ** 3;
|
||||
1 ** <number>temp++ ** 3;
|
||||
|
||||
(void --temp) ** 3;
|
||||
(void temp--) ** 3;
|
||||
(void 3) ** 4;
|
||||
(void temp++) ** 4;
|
||||
(void temp--) ** 4;
|
||||
|
||||
|
||||
1 ** (void --temp) ** 3;
|
||||
1 ** (void temp--) ** 3;
|
||||
1 ** (void 3) ** 4;
|
||||
1 ** (void temp++) ** 4;
|
||||
1 ** (void temp--) ** 4;
|
||||
|
||||
(~ --temp) ** 3;
|
||||
(~ temp--) ** 3;
|
||||
(~ 3) ** 4;
|
||||
(~ temp++) ** 4;
|
||||
(~ temp--) ** 4;
|
||||
|
||||
1 ** (~ --temp) ** 3;
|
||||
1 ** (~ temp--) ** 3;
|
||||
1 ** (~ 3) ** 4;
|
||||
1 ** (~ temp++) ** 4;
|
||||
1 ** (~ temp--) ** 4;
|
||||
@ -0,0 +1,37 @@
|
||||
// @target: es7
|
||||
var temp: any;
|
||||
|
||||
<number>--temp ** 3;
|
||||
<number>++temp ** 3;
|
||||
<number>temp-- ** 3;
|
||||
<number>temp++ ** 3;
|
||||
|
||||
1 ** <number>--temp ** 3;
|
||||
1 ** <number>++temp ** 3;
|
||||
1 ** <number>temp-- ** 3;
|
||||
1 ** <number>temp++ ** 3;
|
||||
|
||||
(void --temp) ** 3;
|
||||
(void temp--) ** 3;
|
||||
(void 3) ** 4;
|
||||
(void temp++) ** 4;
|
||||
(void temp--) ** 4;
|
||||
|
||||
|
||||
1 ** (void --temp) ** 3;
|
||||
1 ** (void temp--) ** 3;
|
||||
1 ** (void 3) ** 4;
|
||||
1 ** (void temp++) ** 4;
|
||||
1 ** (void temp--) ** 4;
|
||||
|
||||
(~ --temp) ** 3;
|
||||
(~temp--) ** 3;
|
||||
(~3) ** 4;
|
||||
(~temp++) ** 4;
|
||||
(~temp--) ** 4;
|
||||
|
||||
1 ** (~ --temp) ** 3;
|
||||
1 ** (~temp--) ** 3;
|
||||
1 ** (~3) ** 4;
|
||||
1 ** (~temp++) ** 4;
|
||||
1 ** (~temp--) ** 4;
|
||||
@ -0,0 +1,28 @@
|
||||
// @target: es5
|
||||
|
||||
var t1 = 10;
|
||||
var t2 = 10;
|
||||
var s;
|
||||
|
||||
// With TemplateTail
|
||||
`${t1 ** -t2} world`;
|
||||
`${(-t1) ** t2 - t1} world`;
|
||||
`${(-++t1) ** t2 - t1} world`;
|
||||
`${(-t1++) ** t2 - t1} world`;
|
||||
`${(~t1) ** t2 ** --t1 } world`;
|
||||
`${typeof (t1 ** t2 ** t1) } world`;
|
||||
|
||||
// TempateHead & TemplateTail are empt
|
||||
`${t1 ** -t2} hello world ${t1 ** -t2}`;
|
||||
`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`;
|
||||
`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`;
|
||||
`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`;
|
||||
`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`;
|
||||
`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`;
|
||||
|
||||
// With templateHead
|
||||
`hello ${(-t1) ** t2 - t1}`;
|
||||
`hello ${(-++t1) ** t2 - t1}`;
|
||||
`hello ${(-t1++) ** t2 - t1}`;
|
||||
`hello ${(~t1) ** t2 ** --t1 }`;
|
||||
`hello ${typeof (t1 ** t2 ** t1)}`;
|
||||
@ -0,0 +1,28 @@
|
||||
// @target: es6
|
||||
|
||||
var t1 = 10;
|
||||
var t2 = 10;
|
||||
var s;
|
||||
|
||||
// With TemplateTail
|
||||
`${t1 ** -t2} world`;
|
||||
`${(-t1) ** t2 - t1} world`;
|
||||
`${(-++t1) ** t2 - t1} world`;
|
||||
`${(-t1++) ** t2 - t1} world`;
|
||||
`${(~t1) ** t2 ** --t1 } world`;
|
||||
`${typeof (t1 ** t2 ** t1) } world`;
|
||||
|
||||
// TempateHead & TemplateTail are empt
|
||||
`${t1 ** -t2} hello world ${t1 ** -t2}`;
|
||||
`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`;
|
||||
`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`;
|
||||
`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`;
|
||||
`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`;
|
||||
`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`;
|
||||
|
||||
// With templateHead
|
||||
`hello ${(-t1) ** t2 - t1}`;
|
||||
`hello ${(-++t1) ** t2 - t1}`;
|
||||
`hello ${(-t1++) ** t2 - t1}`;
|
||||
`hello ${(~t1) ** t2 ** --t1 }`;
|
||||
`hello ${typeof (t1 ** t2 ** t1)}`;
|
||||
@ -10,13 +10,7 @@ var s;
|
||||
`${t1 + t2 ** t1}`;
|
||||
`${t1 ** t2 + t1}`;
|
||||
`${t1 + t2 ** t2 + t1 }`;
|
||||
`${-t1 ** t2 - t1}`;
|
||||
`${-++t1 ** t2 - t1}`;
|
||||
`${-t1++ ** t2 - t1}`;
|
||||
`${!t1 ** t2 ** --t1 }`;
|
||||
`${typeof t1 ** t2 ** t1}`;
|
||||
`${typeof (t1 ** t2 ** t1) }`;
|
||||
`${1 + typeof t1 ** t2 ** t1}`;
|
||||
`${1 + typeof (t1 ** t2 ** t1) }`;
|
||||
|
||||
`${t1 ** t2}${t1 ** t2}`;
|
||||
@ -24,23 +18,11 @@ var s;
|
||||
`${t1 + t2 ** t1}${t1 + t2 ** t1}`;
|
||||
`${t1 ** t2 + t1}${t1 ** t2 + t1}`;
|
||||
`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`;
|
||||
`${-t1 ** t2 - t1}${-t1 ** t2 - t1}`;
|
||||
`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`;
|
||||
`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`;
|
||||
`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`;
|
||||
`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`;
|
||||
`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`;
|
||||
`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`;
|
||||
|
||||
`${t1 ** t2} hello world ${t1 ** t2}`;
|
||||
`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`;
|
||||
`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`;
|
||||
`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`;
|
||||
`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`;
|
||||
`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`;
|
||||
`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`;
|
||||
`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`;
|
||||
`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`;
|
||||
`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`;
|
||||
`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`;
|
||||
`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`;
|
||||
`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`;
|
||||
@ -10,13 +10,7 @@ var s;
|
||||
`${t1 + t2 ** t1}`;
|
||||
`${t1 ** t2 + t1}`;
|
||||
`${t1 + t2 ** t2 + t1 }`;
|
||||
`${-t1 ** t2 - t1}`;
|
||||
`${-++t1 ** t2 - t1}`;
|
||||
`${-t1++ ** t2 - t1}`;
|
||||
`${!t1 ** t2 ** --t1 }`;
|
||||
`${typeof t1 ** t2 ** t1}`;
|
||||
`${typeof (t1 ** t2 ** t1) }`;
|
||||
`${1 + typeof t1 ** t2 ** t1}`;
|
||||
`${1 + typeof (t1 ** t2 ** t1) }`;
|
||||
|
||||
`${t1 ** t2}${t1 ** t2}`;
|
||||
@ -24,23 +18,11 @@ var s;
|
||||
`${t1 + t2 ** t1}${t1 + t2 ** t1}`;
|
||||
`${t1 ** t2 + t1}${t1 ** t2 + t1}`;
|
||||
`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`;
|
||||
`${-t1 ** t2 - t1}${-t1 ** t2 - t1}`;
|
||||
`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`;
|
||||
`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`;
|
||||
`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`;
|
||||
`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`;
|
||||
`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`;
|
||||
`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`;
|
||||
|
||||
`${t1 ** t2} hello world ${t1 ** t2}`;
|
||||
`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`;
|
||||
`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`;
|
||||
`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`;
|
||||
`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`;
|
||||
`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`;
|
||||
`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`;
|
||||
`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`;
|
||||
`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`;
|
||||
`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`;
|
||||
`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`;
|
||||
`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`;
|
||||
`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`;
|
||||
@ -10,13 +10,7 @@ var s;
|
||||
`hello ${t1 + t2 ** t1}`;
|
||||
`hello ${t1 ** t2 + t1}`;
|
||||
`hello ${t1 + t2 ** t2 + t1 }`;
|
||||
`hello ${-t1 ** t2 - t1}`;
|
||||
`hello ${-++t1 ** t2 - t1}`;
|
||||
`hello ${-t1++ ** t2 - t1}`;
|
||||
`hello ${!t1 ** t2 ** --t1 }`;
|
||||
`hello ${typeof t1 ** t2 ** t1}`;
|
||||
`hello ${typeof (t1 ** t2 ** t1) }`;
|
||||
`hello ${1 + typeof t1 ** t2 ** t1}`;
|
||||
`hello ${1 + typeof (t1 ** t2 ** t1) }`;
|
||||
|
||||
`hello ${t1 ** t2}${t1 ** t2}`;
|
||||
@ -24,23 +18,11 @@ var s;
|
||||
`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`;
|
||||
`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`;
|
||||
`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`;
|
||||
`hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`;
|
||||
`hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`;
|
||||
`hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`;
|
||||
`hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`;
|
||||
`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`;
|
||||
`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`;
|
||||
`hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`;
|
||||
|
||||
`hello ${t1 ** t2} hello world ${t1 ** t2}`;
|
||||
`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`;
|
||||
`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`;
|
||||
`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`;
|
||||
`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`;
|
||||
`hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`;
|
||||
`hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`;
|
||||
`hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`;
|
||||
`hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`;
|
||||
`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`;
|
||||
`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`;
|
||||
`hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`;
|
||||
`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`;
|
||||
@ -10,13 +10,7 @@ var s;
|
||||
`hello ${t1 + t2 ** t1}`;
|
||||
`hello ${t1 ** t2 + t1}`;
|
||||
`hello ${t1 + t2 ** t2 + t1 }`;
|
||||
`hello ${-t1 ** t2 - t1}`;
|
||||
`hello ${-++t1 ** t2 - t1}`;
|
||||
`hello ${-t1++ ** t2 - t1}`;
|
||||
`hello ${!t1 ** t2 ** --t1 }`;
|
||||
`hello ${typeof t1 ** t2 ** t1}`;
|
||||
`hello ${typeof (t1 ** t2 ** t1) }`;
|
||||
`hello ${1 + typeof t1 ** t2 ** t1}`;
|
||||
`hello ${1 + typeof (t1 ** t2 ** t1) }`;
|
||||
|
||||
`hello ${t1 ** t2}${t1 ** t2}`;
|
||||
@ -24,23 +18,11 @@ var s;
|
||||
`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`;
|
||||
`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`;
|
||||
`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`;
|
||||
`hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`;
|
||||
`hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`;
|
||||
`hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`;
|
||||
`hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`;
|
||||
`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`;
|
||||
`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`;
|
||||
`hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`;
|
||||
|
||||
`hello ${t1 ** t2} hello world ${t1 ** t2}`;
|
||||
`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`;
|
||||
`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`;
|
||||
`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`;
|
||||
`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`;
|
||||
`hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`;
|
||||
`hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`;
|
||||
`hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`;
|
||||
`hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`;
|
||||
`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`;
|
||||
`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`;
|
||||
`hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`;
|
||||
`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`;
|
||||
@ -10,13 +10,7 @@ var s;
|
||||
`${t1 + t2 ** t1} world`;
|
||||
`${t1 ** t2 + t1} world`;
|
||||
`${t1 + t2 ** t2 + t1 } world`;
|
||||
`${-t1 ** t2 - t1} world`;
|
||||
`${-++t1 ** t2 - t1} world`;
|
||||
`${-t1++ ** t2 - t1} world`;
|
||||
`${!t1 ** t2 ** --t1 } world`;
|
||||
`${typeof t1 ** t2 ** t1} world`;
|
||||
`${typeof (t1 ** t2 ** t1) } world`;
|
||||
`${1 + typeof t1 ** t2 ** t1} world`;
|
||||
`${1 + typeof (t1 ** t2 ** t1) } world`;
|
||||
|
||||
`${t1 ** t2}${t1 ** t2} world`;
|
||||
@ -24,23 +18,11 @@ var s;
|
||||
`${t1 + t2 ** t1}${t1 + t2 ** t1} world`;
|
||||
`${t1 ** t2 + t1}${t1 ** t2 + t1} world`;
|
||||
`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`;
|
||||
`${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`;
|
||||
`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`;
|
||||
`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`;
|
||||
`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`;
|
||||
`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`;
|
||||
`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`;
|
||||
`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`;
|
||||
|
||||
`${t1 ** t2} hello world ${t1 ** t2} !!`;
|
||||
`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`;
|
||||
`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`;
|
||||
`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`;
|
||||
`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`;
|
||||
`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`;
|
||||
`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`;
|
||||
`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`;
|
||||
`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`;
|
||||
`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`;
|
||||
`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`;
|
||||
`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`;
|
||||
@ -10,13 +10,7 @@ var s;
|
||||
`${t1 + t2 ** t1} world`;
|
||||
`${t1 ** t2 + t1} world`;
|
||||
`${t1 + t2 ** t2 + t1 } world`;
|
||||
`${-t1 ** t2 - t1} world`;
|
||||
`${-++t1 ** t2 - t1} world`;
|
||||
`${-t1++ ** t2 - t1} world`;
|
||||
`${!t1 ** t2 ** --t1 } world`;
|
||||
`${typeof t1 ** t2 ** t1} world`;
|
||||
`${typeof (t1 ** t2 ** t1) } world`;
|
||||
`${1 + typeof t1 ** t2 ** t1} world`;
|
||||
`${1 + typeof (t1 ** t2 ** t1) } world`;
|
||||
|
||||
`${t1 ** t2}${t1 ** t2} world`;
|
||||
@ -24,23 +18,11 @@ var s;
|
||||
`${t1 + t2 ** t1}${t1 + t2 ** t1} world`;
|
||||
`${t1 ** t2 + t1}${t1 ** t2 + t1} world`;
|
||||
`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`;
|
||||
`${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`;
|
||||
`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`;
|
||||
`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`;
|
||||
`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`;
|
||||
`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`;
|
||||
`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`;
|
||||
`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`;
|
||||
|
||||
`${t1 ** t2} hello world ${t1 ** t2} !!`;
|
||||
`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`;
|
||||
`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`;
|
||||
`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`;
|
||||
`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`;
|
||||
`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`;
|
||||
`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`;
|
||||
`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`;
|
||||
`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`;
|
||||
`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`;
|
||||
`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`;
|
||||
`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`;
|
||||
@ -0,0 +1,28 @@
|
||||
// @target: es5
|
||||
|
||||
var t1 = 10;
|
||||
var t2 = 10;
|
||||
var s;
|
||||
|
||||
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
|
||||
// TempateHead & TemplateTail are empty
|
||||
`${1 + typeof t1 ** t2 ** t1}`;
|
||||
`${-t1 ** t2 - t1}`;
|
||||
`${-++t1 ** t2 - t1}`;
|
||||
`${-t1++ ** t2 - t1}`;
|
||||
`${!t1 ** t2 ** --t1 }`;
|
||||
`${typeof t1 ** t2 ** t1}`;
|
||||
|
||||
`${-t1 ** t2 - t1}${-t1 ** t2 - t1}`;
|
||||
`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`;
|
||||
`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`;
|
||||
`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`;
|
||||
`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`;
|
||||
`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`;
|
||||
|
||||
`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`;
|
||||
`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`;
|
||||
`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`;
|
||||
`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`;
|
||||
`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`;
|
||||
`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`;
|
||||
@ -0,0 +1,28 @@
|
||||
// @target: es5
|
||||
|
||||
var t1 = 10;
|
||||
var t2 = 10;
|
||||
var s;
|
||||
|
||||
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
|
||||
// With templateHead
|
||||
`hello ${-t1 ** t2 - t1}`;
|
||||
`hello ${-++t1 ** t2 - t1}`;
|
||||
`hello ${-t1++ ** t2 - t1}`;
|
||||
`hello ${!t1 ** t2 ** --t1 }`;
|
||||
`hello ${typeof t1 ** t2 ** t1}`;
|
||||
`hello ${1 + typeof t1 ** t2 ** t1}`;
|
||||
|
||||
`hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`;
|
||||
`hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`;
|
||||
`hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`;
|
||||
`hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`;
|
||||
`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`;
|
||||
`hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`;
|
||||
|
||||
`hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`;
|
||||
`hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`;
|
||||
`hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`;
|
||||
`hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`;
|
||||
`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`;
|
||||
`hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`;
|
||||
@ -0,0 +1,28 @@
|
||||
// @target: es5
|
||||
|
||||
var t1 = 10;
|
||||
var t2 = 10;
|
||||
var s;
|
||||
|
||||
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
|
||||
// With TemplateTail
|
||||
`${-t1 ** t2 - t1} world`;
|
||||
`${-++t1 ** t2 - t1} world`;
|
||||
`${-t1++ ** t2 - t1} world`;
|
||||
`${!t1 ** t2 ** --t1 } world`;
|
||||
`${typeof t1 ** t2 ** t1} world`;
|
||||
`${1 + typeof t1 ** t2 ** t1} world`;
|
||||
|
||||
`${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`;
|
||||
`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`;
|
||||
`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`;
|
||||
`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`;
|
||||
`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`;
|
||||
`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`;
|
||||
|
||||
`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`;
|
||||
`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`;
|
||||
`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`;
|
||||
`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`;
|
||||
`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`;
|
||||
`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`;
|
||||
@ -0,0 +1,39 @@
|
||||
// @target: es5
|
||||
|
||||
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
|
||||
-1 ** 2;
|
||||
+1 ** 2
|
||||
1 ** -2 ** 3;
|
||||
1 ** -2 ** -3;
|
||||
-1 ** -2 ** -3;
|
||||
-(1 ** 2) ** 3;
|
||||
|
||||
var temp = 10;
|
||||
|
||||
-++temp ** 3;
|
||||
+--temp ** 3;
|
||||
-temp++ ** 3;
|
||||
+temp-- ** 3;
|
||||
1 ** -++temp ** 3;
|
||||
1 ** +--temp ** 3;
|
||||
1 ** -temp++ ** 3;
|
||||
1 ** +temp-- ** 3;
|
||||
|
||||
-3 ** temp++;
|
||||
-3 ** temp--;
|
||||
-3 ** ++temp;
|
||||
-3 ** --temp;
|
||||
+3 ** temp++;
|
||||
+3 ** temp--;
|
||||
+3 ** ++temp;
|
||||
+3 ** --temp;
|
||||
-3 ** temp++ ** 2;
|
||||
-3 ** temp-- ** 2;
|
||||
-3 ** ++temp ** 2;
|
||||
-3 ** --temp ** 2;
|
||||
+3 ** temp++ ** 2;
|
||||
+3 ** temp-- ** 2;
|
||||
+3 ** ++temp ** 2;
|
||||
+3 ** --temp ** 2;
|
||||
|
||||
|
||||
@ -0,0 +1,63 @@
|
||||
// @target: es5
|
||||
|
||||
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
|
||||
var temp;
|
||||
|
||||
delete --temp ** 3;
|
||||
delete ++temp ** 3;
|
||||
delete temp-- ** 3;
|
||||
delete temp++ ** 3;
|
||||
|
||||
|
||||
1 ** delete --temp ** 3;
|
||||
1 ** delete ++temp ** 3;
|
||||
1 ** delete temp-- ** 3;
|
||||
1 ** delete temp++ ** 3;
|
||||
|
||||
typeof --temp ** 3;
|
||||
typeof temp-- ** 3;
|
||||
typeof 3 ** 4;
|
||||
typeof temp++ ** 4;
|
||||
typeof temp-- ** 4;
|
||||
|
||||
1 ** typeof --temp ** 3;
|
||||
1 ** typeof temp-- ** 3;
|
||||
1 ** typeof 3 ** 4;
|
||||
1 ** typeof temp++ ** 4;
|
||||
1 ** typeof temp-- ** 4;
|
||||
|
||||
void --temp ** 3;
|
||||
void temp-- ** 3;
|
||||
void 3 ** 4;
|
||||
void temp++ ** 4;
|
||||
void temp-- ** 4;
|
||||
|
||||
1 ** void --temp ** 3;
|
||||
1 ** void temp-- ** 3;
|
||||
1 ** void 3 ** 4;
|
||||
1 ** void temp++ ** 4;
|
||||
1 ** void temp-- ** 4 ;
|
||||
|
||||
~ --temp ** 3;
|
||||
~temp-- ** 3;
|
||||
~3 ** 4;
|
||||
~temp++ ** 4;
|
||||
~temp-- ** 4;
|
||||
|
||||
1 ** ~ --temp ** 3;
|
||||
1 ** ~temp-- ** 3;
|
||||
1 ** ~3 ** 4;
|
||||
1 ** ~temp++ ** 4;
|
||||
1 ** ~temp-- ** 4;
|
||||
|
||||
! --temp ** 3;
|
||||
!temp-- ** 3;
|
||||
!3 ** 4;
|
||||
!temp++ ** 4;
|
||||
!temp-- ** 4;
|
||||
|
||||
1 ** ! --temp ** 3;
|
||||
1 ** !temp-- ** 3;
|
||||
1 ** !3 ** 4;
|
||||
1 ** !temp++ ** 4;
|
||||
1 ** !temp-- ** 4;
|
||||
@ -0,0 +1,36 @@
|
||||
var temp: any;
|
||||
|
||||
// Error: incorrect type on left-hand side
|
||||
(! --temp) ** 3;
|
||||
(!temp--) ** 3;
|
||||
(!3) ** 4;
|
||||
(!temp++) ** 4;
|
||||
(!temp--) ** 4;
|
||||
|
||||
(! --temp) ** 3 ** 1;
|
||||
(!temp--) ** 3 ** 1;
|
||||
(!3) ** 4 ** 1;
|
||||
(!temp++) ** 4 ** 1;
|
||||
(!temp--) ** 4 ** 1;
|
||||
|
||||
(typeof --temp) ** 3;
|
||||
(typeof temp--) ** 3;
|
||||
(typeof 3) ** 4;
|
||||
(typeof temp++) ** 4;
|
||||
(typeof temp--) ** 4;
|
||||
|
||||
1 ** (typeof --temp) ** 3;
|
||||
1 ** (typeof temp--) ** 3;
|
||||
1 ** (typeof 3) ** 4;
|
||||
1 ** (typeof temp++) ** 4;
|
||||
1 ** (typeof temp--) ** 4;
|
||||
|
||||
(delete --temp) ** 3;
|
||||
(delete ++temp) ** 3;
|
||||
(delete temp--) ** 3;
|
||||
(delete temp++) ** 3;
|
||||
|
||||
1 ** (delete --temp) ** 3;
|
||||
1 ** (delete ++temp) ** 3;
|
||||
1 ** (delete temp--) ** 3;
|
||||
1 ** (delete temp++) ** 3;
|
||||
Loading…
x
Reference in New Issue
Block a user