Add baselines when having early syntax error in exponentiation

This commit is contained in:
Yui T 2015-10-05 19:06:17 -07:00
parent 46d799e05d
commit d0aaf41252
10 changed files with 1275 additions and 0 deletions

View File

@ -0,0 +1,165 @@
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(8,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(8,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(9,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(10,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(11,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(12,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(12,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(13,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(13,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(15,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(15,25): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(16,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(16,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(17,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(17,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,25): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(18,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,28): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(19,38): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,36): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(20,46): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(22,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(22,38): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(23,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(23,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(24,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(24,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,38): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(25,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,41): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(26,51): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,49): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts(27,59): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError1.ts (45 errors) ====
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}`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-t1 ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-++t1 ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-t1++ ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${!t1 ** t2 ** --t1 }`;
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${typeof t1 ** t2 ** t1}`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-t1 ** t2 - t1}${-t1 ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`;
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`;
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.

View File

@ -0,0 +1,53 @@
//// [exponentiationOperatorInTemplateStringWithSyntaxError1.ts]
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}`;
//// [exponentiationOperatorInTemplateStringWithSyntaxError1.js]
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 + Math.pow(typeof t1, Math.pow(t2, t1)));
"" + (Math.pow(-t1, t2) - t1);
"" + (Math.pow(-++t1, t2) - t1);
"" + (Math.pow(-t1++, t2) - t1);
"" + (Math.pow(!t1, Math.pow(t2, --t1)));
"" + (Math.pow(typeof t1, Math.pow(t2, t1)));
"" + (Math.pow(-t1, t2) - t1) + (Math.pow(-t1, t2) - t1);
"" + (Math.pow(-++t1, t2) - t1) + (Math.pow(-++t1, t2) - t1);
"" + (Math.pow(-t1++, t2) - t1) + (Math.pow(-t1++, t2) - t1);
"" + (Math.pow(!t1, Math.pow(t2, --t1))) + (Math.pow(!t1, Math.pow(t2, --t1)));
"" + (Math.pow(typeof t1, Math.pow(t2, t1))) + (Math.pow(typeof t1, Math.pow(t2, t1)));
"" + (1 + Math.pow(typeof t1, Math.pow(t2, t1))) + (1 + Math.pow(typeof t1, Math.pow(t2, t1)));
(Math.pow(-t1, t2) - t1) + " hello world " + (Math.pow(-t1, t2) - t1);
(Math.pow(-++t1, t2) - t1) + " hello world " + (Math.pow(-++t1, t2) - t1);
(Math.pow(-t1++, t2) - t1) + " hello world " + (Math.pow(-t1++, t2) - t1);
(Math.pow(!t1, Math.pow(t2, --t1))) + " hello world " + (Math.pow(!t1, Math.pow(t2, --t1)));
(Math.pow(typeof t1, Math.pow(t2, t1))) + " hello world " + (Math.pow(typeof t1, Math.pow(t2, t1)));
(1 + Math.pow(typeof t1, Math.pow(t2, t1))) + " hello world " + (1 + Math.pow(typeof t1, Math.pow(t2, t1)));

View File

@ -0,0 +1,166 @@
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(8,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(9,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(10,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(11,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(11,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(12,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(12,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(13,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(13,24): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(15,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(15,31): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(16,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(16,35): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(17,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(17,35): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,31): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(18,35): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,34): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(19,44): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,24): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,42): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(20,52): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(22,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(22,44): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(23,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(23,48): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(24,16): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(24,48): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,44): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(25,48): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,10): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,47): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(26,57): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,14): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,24): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,55): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts(27,65): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError2.ts (45 errors) ====
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}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${-++t1 ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${-t1++ ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${!t1 ** t2 ** --t1 }`;
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${typeof t1 ** t2 ** t1}`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${1 + typeof t1 ** t2 ** t1}`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${-t1 ** t2 - t1}${-t1 ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${-++t1 ** t2 - t1}${-++t1 ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${-t1++ ** t2 - t1}${-t1++ ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 }`;
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1}`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1}`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1}`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 }`;
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1}`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`hello ${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1}`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.

View File

@ -0,0 +1,54 @@
//// [exponentiationOperatorInTemplateStringWithSyntaxError2.ts]
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}`;
//// [exponentiationOperatorInTemplateStringWithSyntaxError2.js]
var t1 = 10;
var t2 = 10;
var s;
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
// With templateHead
"hello " + (Math.pow(-t1, t2) - t1);
"hello " + (Math.pow(-++t1, t2) - t1);
"hello " + (Math.pow(-t1++, t2) - t1);
"hello " + (Math.pow(!t1, Math.pow(t2, --t1)));
"hello " + (Math.pow(typeof t1, Math.pow(t2, t1)));
"hello " + (1 + Math.pow(typeof t1, Math.pow(t2, t1)));
"hello " + (Math.pow(-t1, t2) - t1) + (Math.pow(-t1, t2) - t1);
"hello " + (Math.pow(-++t1, t2) - t1) + (Math.pow(-++t1, t2) - t1);
"hello " + (Math.pow(-t1++, t2) - t1) + (Math.pow(-t1++, t2) - t1);
"hello " + (Math.pow(!t1, Math.pow(t2, --t1))) + (Math.pow(!t1, Math.pow(t2, --t1)));
"hello " + (Math.pow(typeof t1, Math.pow(t2, t1))) + (Math.pow(typeof t1, Math.pow(t2, t1)));
"hello " + (1 + Math.pow(typeof t1, Math.pow(t2, t1))) + (1 + Math.pow(typeof t1, Math.pow(t2, t1)));
"hello " + (Math.pow(-t1, t2) - t1) + " hello world " + (Math.pow(-t1, t2) - t1);
"hello " + (Math.pow(-++t1, t2) - t1) + " hello world " + (Math.pow(-++t1, t2) - t1);
"hello " + (Math.pow(-t1++, t2) - t1) + " hello world " + (Math.pow(-t1++, t2) - t1);
"hello " + (Math.pow(!t1, Math.pow(t2, --t1))) + " hello world " + (Math.pow(!t1, Math.pow(t2, --t1)));
"hello " + (Math.pow(typeof t1, Math.pow(t2, t1))) + " hello world " + (Math.pow(typeof t1, Math.pow(t2, t1)));
"hello " + (1 + Math.pow(typeof t1, Math.pow(t2, t1))) + " hello world " + (1 + Math.pow(typeof t1, Math.pow(t2, t1)));

View File

@ -0,0 +1,165 @@
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(8,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(9,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(10,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(11,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(11,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(12,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(12,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(13,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(13,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(15,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(15,25): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(16,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(16,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(17,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(17,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,25): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(18,29): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,28): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(19,38): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,36): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(20,46): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(22,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(22,38): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(23,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(23,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(24,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(24,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,38): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(25,42): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,4): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,41): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(26,51): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,8): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,49): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts(27,59): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorInTemplateStringWithSyntaxError3.ts (45 errors) ====
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`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-++t1 ** t2 - t1} world`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-t1++ ** t2 - t1} world`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${!t1 ** t2 ** --t1 } world`;
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${typeof t1 ** t2 ** t1} world`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${1 + typeof t1 ** t2 ** t1} world`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-t1 ** t2 - t1}${-t1 ** t2 - t1} world`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-++t1 ** t2 - t1}${-++t1 ** t2 - t1} world`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-t1++ ** t2 - t1}${-t1++ ** t2 - t1} world`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${!t1 ** t2 ** --t1 }${!t1 ** t2 ** --t1 } world`;
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${typeof t1 ** t2 ** t1}${typeof t1 ** t2 ** t1} world`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${1 + typeof t1 ** t2 ** t1}${1 + typeof t1 ** t2 ** t1} world`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-t1 ** t2 - t1} hello world ${-t1 ** t2 - t1} !!`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-++t1 ** t2 - t1} hello world ${-++t1 ** t2 - t1} !!`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${-t1++ ** t2 - t1} hello world ${-t1++ ** t2 - t1} !!`;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${!t1 ** t2 ** --t1 } hello world ${!t1 ** t2 ** --t1 } !!`;
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${typeof t1 ** t2 ** t1} hello world ${typeof t1 ** t2 ** t1} !!`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
`${1 + typeof t1 ** t2 ** t1} hello world ${1 + typeof t1 ** t2 ** t1} !!`;
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.

View File

@ -0,0 +1,53 @@
//// [exponentiationOperatorInTemplateStringWithSyntaxError3.ts]
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} !!`;
//// [exponentiationOperatorInTemplateStringWithSyntaxError3.js]
var t1 = 10;
var t2 = 10;
var s;
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
// With TemplateTail
(Math.pow(-t1, t2) - t1) + " world";
(Math.pow(-++t1, t2) - t1) + " world";
(Math.pow(-t1++, t2) - t1) + " world";
(Math.pow(!t1, Math.pow(t2, --t1))) + " world";
(Math.pow(typeof t1, Math.pow(t2, t1))) + " world";
(1 + Math.pow(typeof t1, Math.pow(t2, t1))) + " world";
"" + (Math.pow(-t1, t2) - t1) + (Math.pow(-t1, t2) - t1) + " world";
"" + (Math.pow(-++t1, t2) - t1) + (Math.pow(-++t1, t2) - t1) + " world";
"" + (Math.pow(-t1++, t2) - t1) + (Math.pow(-t1++, t2) - t1) + " world";
"" + (Math.pow(!t1, Math.pow(t2, --t1))) + (Math.pow(!t1, Math.pow(t2, --t1))) + " world";
"" + (Math.pow(typeof t1, Math.pow(t2, t1))) + (Math.pow(typeof t1, Math.pow(t2, t1))) + " world";
"" + (1 + Math.pow(typeof t1, Math.pow(t2, t1))) + (1 + Math.pow(typeof t1, Math.pow(t2, t1))) + " world";
(Math.pow(-t1, t2) - t1) + " hello world " + (Math.pow(-t1, t2) - t1) + " !!";
(Math.pow(-++t1, t2) - t1) + " hello world " + (Math.pow(-++t1, t2) - t1) + " !!";
(Math.pow(-t1++, t2) - t1) + " hello world " + (Math.pow(-t1++, t2) - t1) + " !!";
(Math.pow(!t1, Math.pow(t2, --t1))) + " hello world " + (Math.pow(!t1, Math.pow(t2, --t1))) + " !!";
(Math.pow(typeof t1, Math.pow(t2, t1))) + " hello world " + (Math.pow(typeof t1, Math.pow(t2, t1))) + " !!";
(1 + Math.pow(typeof t1, Math.pow(t2, t1))) + " hello world " + (1 + Math.pow(typeof t1, Math.pow(t2, t1))) + " !!";

View File

@ -0,0 +1,135 @@
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(3,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(4,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(5,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(6,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(7,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(7,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(8,11): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(12,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(13,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(14,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(15,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(16,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(17,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(18,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(19,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(21,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(22,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(23,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(24,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(25,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(26,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(27,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(28,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(29,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(30,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(31,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(32,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(33,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(34,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(35,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts(36,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError1.ts (31 errors) ====
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
-1 ** 2;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
+1 ** 2
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** -2 ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** -2 ** -3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
-1 ** -2 ** -3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
-(1 ** 2) ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
var temp = 10;
-++temp ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
+--temp ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
-temp++ ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
+temp-- ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** -++temp ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** +--temp ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** -temp++ ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** +temp-- ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
-3 ** temp++;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
-3 ** temp--;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
-3 ** ++temp;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
-3 ** --temp;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
+3 ** temp++;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
+3 ** temp--;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
+3 ** ++temp;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
+3 ** --temp;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
-3 ** temp++ ** 2;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
-3 ** temp-- ** 2;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
-3 ** ++temp ** 2;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
-3 ** --temp ** 2;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
+3 ** temp++ ** 2;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
+3 ** temp-- ** 2;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
+3 ** ++temp ** 2;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
+3 ** --temp ** 2;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.

View File

@ -0,0 +1,74 @@
//// [exponentiationOperatorSyntaxError1.ts]
// 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;
//// [exponentiationOperatorSyntaxError1.js]
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
Math.pow(-1, 2);
Math.pow(+1, 2);
Math.pow(1, Math.pow(-2, 3));
Math.pow(1, Math.pow(-2, -3));
Math.pow(-1, Math.pow(-2, -3));
Math.pow(-(Math.pow(1, 2)), 3);
var temp = 10;
Math.pow(-++temp, 3);
Math.pow(+--temp, 3);
Math.pow(-temp++, 3);
Math.pow(+temp--, 3);
Math.pow(1, Math.pow(-++temp, 3));
Math.pow(1, Math.pow(+--temp, 3));
Math.pow(1, Math.pow(-temp++, 3));
Math.pow(1, Math.pow(+temp--, 3));
Math.pow(-3, temp++);
Math.pow(-3, temp--);
Math.pow(-3, ++temp);
Math.pow(-3, --temp);
Math.pow(+3, temp++);
Math.pow(+3, temp--);
Math.pow(+3, ++temp);
Math.pow(+3, --temp);
Math.pow(-3, Math.pow(temp++, 2));
Math.pow(-3, Math.pow(temp--, 2));
Math.pow(-3, Math.pow(++temp, 2));
Math.pow(-3, Math.pow(--temp, 2));
Math.pow(+3, Math.pow(temp++, 2));
Math.pow(+3, Math.pow(temp--, 2));
Math.pow(+3, Math.pow(++temp, 2));
Math.pow(+3, Math.pow(--temp, 2));

View File

@ -0,0 +1,294 @@
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(17,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(17,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(18,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(18,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(19,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(19,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(20,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(20,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(22,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(22,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(23,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(23,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(24,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(24,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(25,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(25,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(26,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(26,20): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(28,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(29,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(30,8): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(31,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(32,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(34,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(35,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(36,13): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(37,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(38,18): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(40,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(41,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(42,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(43,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(44,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(46,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(47,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(48,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(49,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(50,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(52,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(52,10): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(53,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(53,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(54,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(54,4): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(55,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(55,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(56,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(56,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(58,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(58,15): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(59,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(59,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(60,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(60,9): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(61,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(61,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(62,14): error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts (76 errors) ====
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
var temp;
delete --temp ** 3;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
delete ++temp ** 3;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
delete temp-- ** 3;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
delete temp++ ** 3;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** delete --temp ** 3;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** delete ++temp ** 3;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** delete temp-- ** 3;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** delete temp++ ** 3;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
typeof --temp ** 3;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
typeof temp-- ** 3;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
typeof 3 ** 4;
~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
typeof temp++ ** 4;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
typeof temp-- ** 4;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** typeof --temp ** 3;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** typeof temp-- ** 3;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** typeof 3 ** 4;
~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** typeof temp++ ** 4;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** typeof temp-- ** 4;
~~~~~~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
void --temp ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
void temp-- ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
void 3 ** 4;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
void temp++ ** 4;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
void temp-- ** 4;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** void --temp ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** void temp-- ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** void 3 ** 4;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** void temp++ ** 4;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** void temp-- ** 4 ;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~ --temp ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~temp-- ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~3 ** 4;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~temp++ ** 4;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
~temp-- ** 4;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** ~ --temp ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** ~temp-- ** 3;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** ~3 ** 4;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** ~temp++ ** 4;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** ~temp-- ** 4;
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
! --temp ** 3;
~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
!temp-- ** 3;
~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
!3 ** 4;
~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
!temp++ ** 4;
~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
!temp-- ** 4;
~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** ! --temp ** 3;
~~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** !temp-- ** 3;
~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** !3 ** 4;
~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** !temp++ ** 4;
~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.
1 ** !temp-- ** 4;
~~~~~~~
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
~~
!!! error TS17006: Left hand side of '**' cannot be a simple unary expression. Consider parenthesize the expression.

View File

@ -0,0 +1,116 @@
//// [exponentiationOperatorSyntaxError2.ts]
// 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;
//// [exponentiationOperatorSyntaxError2.js]
// Error: early syntax error using ES7 SimpleUnaryExpression on left-hand side without ()
var temp;
Math.pow(delete --temp, 3);
Math.pow(delete ++temp, 3);
Math.pow(delete temp--, 3);
Math.pow(delete temp++, 3);
Math.pow(1, Math.pow(delete --temp, 3));
Math.pow(1, Math.pow(delete ++temp, 3));
Math.pow(1, Math.pow(delete temp--, 3));
Math.pow(1, Math.pow(delete temp++, 3));
Math.pow(typeof --temp, 3);
Math.pow(typeof temp--, 3);
Math.pow(typeof 3, 4);
Math.pow(typeof temp++, 4);
Math.pow(typeof temp--, 4);
Math.pow(1, Math.pow(typeof --temp, 3));
Math.pow(1, Math.pow(typeof temp--, 3));
Math.pow(1, Math.pow(typeof 3, 4));
Math.pow(1, Math.pow(typeof temp++, 4));
Math.pow(1, Math.pow(typeof temp--, 4));
Math.pow(void --temp, 3);
Math.pow(void temp--, 3);
Math.pow(void 3, 4);
Math.pow(void temp++, 4);
Math.pow(void temp--, 4);
Math.pow(1, Math.pow(void --temp, 3));
Math.pow(1, Math.pow(void temp--, 3));
Math.pow(1, Math.pow(void 3, 4));
Math.pow(1, Math.pow(void temp++, 4));
Math.pow(1, Math.pow(void temp--, 4));
Math.pow(~--temp, 3);
Math.pow(~temp--, 3);
Math.pow(~3, 4);
Math.pow(~temp++, 4);
Math.pow(~temp--, 4);
Math.pow(1, Math.pow(~--temp, 3));
Math.pow(1, Math.pow(~temp--, 3));
Math.pow(1, Math.pow(~3, 4));
Math.pow(1, Math.pow(~temp++, 4));
Math.pow(1, Math.pow(~temp--, 4));
Math.pow(!--temp, 3);
Math.pow(!temp--, 3);
Math.pow(!3, 4);
Math.pow(!temp++, 4);
Math.pow(!temp--, 4);
Math.pow(1, Math.pow(!--temp, 3));
Math.pow(1, Math.pow(!temp--, 3));
Math.pow(1, Math.pow(!3, 4));
Math.pow(1, Math.pow(!temp++, 4));
Math.pow(1, Math.pow(!temp--, 4));