From 46d799e05db02e57b3f73d8e97626095fa8a18e8 Mon Sep 17 00:00:00 2001 From: Yui T Date: Mon, 5 Oct 2015 19:05:37 -0700 Subject: [PATCH] Add baselines for using exponentiation in template string --- ...ExponentiationOperatorInTempalteString4.js | 53 +++ ...entiationOperatorInTempalteString4.symbols | 114 ++++++ ...onentiationOperatorInTempalteString4.types | 233 ++++++++++++ ...ExponentiationOperatorInTemplateString1.js | 95 +++-- ...entiationOperatorInTemplateString1.symbols | 227 ++++++------ ...onentiationOperatorInTemplateString1.types | 344 +++++++++--------- ...onentiationOperatorInTemplateString1ES6.js | 53 +++ ...iationOperatorInTemplateString1ES6.symbols | 143 ++++++++ ...ntiationOperatorInTemplateString1ES6.types | 240 ++++++++++++ ...ExponentiationOperatorInTemplateString2.js | 53 +++ ...entiationOperatorInTemplateString2.symbols | 143 ++++++++ ...onentiationOperatorInTemplateString2.types | 240 ++++++++++++ ...onentiationOperatorInTemplateString2ES6.js | 53 +++ ...iationOperatorInTemplateString2ES6.symbols | 143 ++++++++ ...ntiationOperatorInTemplateString2ES6.types | 240 ++++++++++++ ...ExponentiationOperatorInTemplateString3.js | 54 +++ ...entiationOperatorInTemplateString3.symbols | 143 ++++++++ ...onentiationOperatorInTemplateString3.types | 240 ++++++++++++ ...onentiationOperatorInTemplateString3ES6.js | 54 +++ ...iationOperatorInTemplateString3ES6.symbols | 143 ++++++++ ...ntiationOperatorInTemplateString3ES6.types | 240 ++++++++++++ 21 files changed, 2911 insertions(+), 337 deletions(-) create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTempalteString4.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTempalteString4.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString2.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString2.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString3.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString3.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.js create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.symbols create mode 100644 tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.js b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.js new file mode 100644 index 00000000000..433cd764726 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.js @@ -0,0 +1,53 @@ +//// [emitExponentiationOperatorInTempalteString4.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// With TemplateTail +`${t1 ** -t2} world`; +`${(-t1) ** t2 - t1} world`; +`${(-++t1) ** t2 - t1} world`; +`${(-t1++) ** t2 - t1} world`; +`${(~t1) ** t2 ** --t1 } world`; +`${typeof (t1 ** t2 ** t1) } world`; + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +`hello ${(-++t1) ** t2 - t1}`; +`hello ${(-t1++) ** t2 - t1}`; +`hello ${(~t1) ** t2 ** --t1 }`; +`hello ${typeof (t1 ** t2 ** t1)}`; + +//// [emitExponentiationOperatorInTempalteString4.js] +var t1 = 10; +var t2 = 10; +var s; +// With TemplateTail +(Math.pow(t1, -t2)) + " world"; +(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"; +typeof (Math.pow(t1, Math.pow(t2, t1))) + " world"; +// TempateHead & TemplateTail are empt +(Math.pow(t1, -t2)) + " hello world " + (Math.pow(t1, -t2)); +(Math.pow((-t1), t2) - t1) + " hello world " + (Math.pow((-t1), t2) - t1); +(Math.pow((-++t1), t2) - t1) + " hello world " + (Math.pow(t1, Math.pow((-++t1), -t1))); +(Math.pow((-t1++), t2) - t1) + " hello world " + (Math.pow(t2, Math.pow((-t1++), -t1))); +(Math.pow((~t1), Math.pow(t2, --t1))) + " hello world " + (Math.pow((~t1), Math.pow(t2, --t1))); +typeof (Math.pow(t1, Math.pow(t2, t1))) + " hello world " + typeof (Math.pow(t1, Math.pow(t2, t1))); +// 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 " + typeof (Math.pow(t1, Math.pow(t2, t1))); diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.symbols b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.symbols new file mode 100644 index 00000000000..7892323ef1d --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.symbols @@ -0,0 +1,114 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTempalteString4.ts, 3, 3)) + +// With TemplateTail +`${t1 ** -t2} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) + +`${(-t1) ** t2 - t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${(-++t1) ** t2 - t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${(-t1++) ** t2 - t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${(~t1) ** t2 ** --t1 } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) + +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`hello ${(-++t1) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`hello ${(-t1++) ** t2 - t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`hello ${(~t1) ** t2 ** --t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1)}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types new file mode 100644 index 00000000000..b4d1aebd4f6 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTempalteString4.types @@ -0,0 +1,233 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// With TemplateTail +`${t1 ** -t2} world`; +>`${t1 ** -t2} world` : string +>t1 ** -t2 : number +>t1 : number +>-t2 : number +>t2 : number + +`${(-t1) ** t2 - t1} world`; +>`${(-t1) ** t2 - t1} world` : string +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number + +`${(-++t1) ** t2 - t1} world`; +>`${(-++t1) ** t2 - t1} world` : string +>(-++t1) ** t2 - t1 : number +>(-++t1) ** t2 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>t2 : number +>t1 : number + +`${(-t1++) ** t2 - t1} world`; +>`${(-t1++) ** t2 - t1} world` : string +>(-t1++) ** t2 - t1 : number +>(-t1++) ** t2 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number + +`${(~t1) ** t2 ** --t1 } world`; +>`${(~t1) ** t2 ** --t1 } world` : string +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } world`; +>`${typeof (t1 ** t2 ** t1) } world` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +// TempateHead & TemplateTail are empt +`${t1 ** -t2} hello world ${t1 ** -t2}`; +>`${t1 ** -t2} hello world ${t1 ** -t2}` : string +>t1 ** -t2 : number +>t1 : number +>-t2 : number +>t2 : number +>t1 ** -t2 : number +>t1 : number +>-t2 : number +>t2 : number + +`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`; +>`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}` : string +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number + +`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`; +>`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}` : string +>(-++t1) ** t2 - t1 : number +>(-++t1) ** t2 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** (-++t1) **- t1 : number +>t1 : number +>(-++t1) **- t1 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>- t1 : number +>t1 : number + +`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`; +>`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}` : string +>(-t1++) ** t2 - t1 : number +>(-t1++) ** t2 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number +>t2 ** (-t1++) ** - t1 : number +>t2 : number +>(-t1++) ** - t1 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>- t1 : number +>t1 : number + +`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`; +>`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }` : string +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`; +>`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +// With templateHead +`hello ${(-t1) ** t2 - t1}`; +>`hello ${(-t1) ** t2 - t1}` : string +>(-t1) ** t2 - t1 : number +>(-t1) ** t2 : number +>(-t1) : number +>-t1 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${(-++t1) ** t2 - t1}`; +>`hello ${(-++t1) ** t2 - t1}` : string +>(-++t1) ** t2 - t1 : number +>(-++t1) ** t2 : number +>(-++t1) : number +>-++t1 : number +>++t1 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${(-t1++) ** t2 - t1}`; +>`hello ${(-t1++) ** t2 - t1}` : string +>(-t1++) ** t2 - t1 : number +>(-t1++) ** t2 : number +>(-t1++) : number +>-t1++ : number +>t1++ : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${(~t1) ** t2 ** --t1 }`; +>`hello ${(~t1) ** t2 ** --t1 }` : string +>(~t1) ** t2 ** --t1 : number +>(~t1) : number +>~t1 : number +>t1 : number +>t2 ** --t1 : number +>t2 : number +>--t1 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1)}`; +>`hello ${typeof (t1 ** t2 ** t1)}` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.js b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.js index cea4b78963b..eb879cce6a5 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.js +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.js @@ -1,60 +1,53 @@ //// [emitExponentiationOperatorInTemplateString1.ts] + var t1 = 10; var t2 = 10; var s; -`Exp: ${t1 ** t2} abc`; -`Exp: ${t1 ** t2 ** t1} abc`; -`Exp: ${t1 + t2 ** t1} abc`; -`Exp: ${t1 - t2 ** t1} abc`; -`Exp: ${t1 ** t2 + t1} abc`; -`Exp: ${t1 ** t2 - t1} abc`; -`Exp: ${t1 + t2 ** t2 + t1} abc`; -`Exp: ${t1 - t2 ** t2 - t1} abc`; -`Exp: ${-t1 ** t2 - t1} abc`; -`Exp: ${+t1 ** t2 - t1} abc`; -`Exp: ${-++t1 ** t2 - t1} abc`; -`Exp: ${+--t1 ** t2 - t1} abc`; -`Exp: ${-t1++ ** t2 - t1} abc`; -`Exp: ${-t1-- ** t2 - t1} abc`; -`Exp: ${+t1++ ** t2 - t1} abc`; -`Exp: ${+t1-- ** t2 - t1} abc`; -`Exp: ${typeof t1 ** t2 ** t1} abc`; -`Exp: ${typeof t1 ** t2 + t1} abc`; -`Exp: ${typeof t1 ** (t2 - t1)} abc`; -`Exp: ${1 + typeof t1 ** t2 ** t1} abc`; -`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc`; -`Exp: ${3 + typeof t1 ** t2 ** --t1} abc`; -`Exp: ${!t1 ** t2 ** t1} abc`; -`Exp: ${!t1 ** t2 ** ++t1} abc`; -`Exp: ${!t1 ** t2 ** --t1} abc`; - + +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +`${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1 }`; +`${typeof (t1 ** t2 ** t1) }`; +`${1 + typeof (t1 ** t2 ** t1) }`; + +`${t1 ** t2}${t1 ** t2}`; +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; + +`${t1 ** t2} hello world ${t1 ** t2}`; +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; //// [emitExponentiationOperatorInTemplateString1.js] var t1 = 10; var t2 = 10; var s; -"Exp: " + (Math.pow(t1, t2)) + " abc"; -"Exp: " + (Math.pow(t1, Math.pow(t2, t1))) + " abc"; -"Exp: " + (t1 + Math.pow(t2, t1)) + " abc"; -"Exp: " + (t1 - Math.pow(t2, t1)) + " abc"; -"Exp: " + (Math.pow(t1, t2) + t1) + " abc"; -"Exp: " + (Math.pow(t1, t2) - t1) + " abc"; -"Exp: " + (t1 + Math.pow(t2, t2) + t1) + " abc"; -"Exp: " + (t1 - Math.pow(t2, t2) - t1) + " abc"; -"Exp: " + (-Math.pow(t1, t2) - t1) + " abc"; -"Exp: " + (+Math.pow(t1, t2) - t1) + " abc"; -"Exp: " + (-Math.pow(++t1, t2) - t1) + " abc"; -"Exp: " + (+Math.pow(--t1, t2) - t1) + " abc"; -"Exp: " + (-Math.pow(t1++, t2) - t1) + " abc"; -"Exp: " + (-Math.pow(t1--, t2) - t1) + " abc"; -"Exp: " + (+Math.pow(t1++, t2) - t1) + " abc"; -"Exp: " + (+Math.pow(t1--, t2) - t1) + " abc"; -"Exp: " + typeof Math.pow(t1, Math.pow(t2, t1)) + " abc"; -"Exp: " + (typeof Math.pow(t1, t2) + t1) + " abc"; -"Exp: " + typeof Math.pow(t1, (t2 - t1)) + " abc"; -"Exp: " + (1 + typeof Math.pow(t1, Math.pow(t2, t1))) + " abc"; -"Exp: " + (2 + typeof Math.pow(t1, Math.pow(t2, ++t1))) + " abc"; -"Exp: " + (3 + typeof Math.pow(t1, Math.pow(t2, --t1))) + " abc"; -"Exp: " + !Math.pow(t1, Math.pow(t2, t1)) + " abc"; -"Exp: " + !Math.pow(t1, Math.pow(t2, ++t1)) + " abc"; -"Exp: " + !Math.pow(t1, Math.pow(t2, --t1)) + " abc"; +// TempateHead & TemplateTail are empty +"" + (Math.pow(t1, t2)); +"" + (Math.pow(t1, Math.pow(t2, t1))); +"" + (t1 + Math.pow(t2, t1)); +"" + (Math.pow(t1, t2) + t1); +"" + (t1 + Math.pow(t2, t2) + t1); +"" + typeof (Math.pow(t1, Math.pow(t2, t1))); +"" + (1 + typeof (Math.pow(t1, Math.pow(t2, t1)))); +"" + (Math.pow(t1, t2)) + (Math.pow(t1, t2)); +"" + (Math.pow(t1, Math.pow(t2, t1))) + (Math.pow(t1, Math.pow(t2, t1))); +"" + (t1 + Math.pow(t2, t1)) + (t1 + Math.pow(t2, t1)); +"" + (Math.pow(t1, t2) + t1) + (Math.pow(t1, t2) + t1); +"" + (t1 + Math.pow(t2, t2) + t1) + (t1 + Math.pow(t2, t2) + t1); +"" + typeof (Math.pow(t1, Math.pow(t2, t1))) + typeof (Math.pow(t1, Math.pow(t2, t1))); +(Math.pow(t1, t2)) + " hello world " + (Math.pow(t1, t2)); +(Math.pow(t1, Math.pow(t2, t1))) + " hello world " + (Math.pow(t1, Math.pow(t2, t1))); +(t1 + Math.pow(t2, t1)) + " hello world " + (t1 + Math.pow(t2, t1)); +(Math.pow(t1, t2) + t1) + " hello world " + (Math.pow(t1, t2) + t1); +(t1 + Math.pow(t2, t2) + t1) + " hello world " + (t1 + Math.pow(t2, t2) + t1); +typeof (Math.pow(t1, Math.pow(t2, t1))) + " hello world " + typeof (Math.pow(t1, Math.pow(t2, t1))); diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.symbols b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.symbols index 5ef2abc4395..8830135987e 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.symbols +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.symbols @@ -1,136 +1,143 @@ === tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts === + var t1 = 10; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) var t2 = 10; ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) var s; ->s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString1.ts, 3, 3)) -`Exp: ${t1 ** t2} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) -`Exp: ${t1 ** t2 ** t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${t1 + t2 ** t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${t1 - t2 ** t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${t1 ** t2 + t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 + t2 ** t2 + t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${t1 ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${t1 + t2 ** t2 + t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${1 + typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${t1 - t2 ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2}${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) -`Exp: ${-t1 ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${+t1 ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${-++t1 ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${+--t1 ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${-t1++ ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${-t1-- ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2} hello world ${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) -`Exp: ${+t1++ ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${+t1-- ** t2 - t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${typeof t1 ** t2 ** t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${typeof t1 ** t2 + t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) -`Exp: ${typeof t1 ** (t2 - t1)} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) - -`Exp: ${1 + typeof t1 ** t2 ** t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) - -`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) - -`Exp: ${3 + typeof t1 ** t2 ** --t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) - -`Exp: ${!t1 ** t2 ** t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) - -`Exp: ${!t1 ** t2 ** ++t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) - -`Exp: ${!t1 ** t2 ** --t1} abc`; ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) ->t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) ->t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 0, 3)) +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3)) diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types index b6324c4bd4c..02ae523c168 100644 --- a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1.types @@ -1,4 +1,5 @@ === tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts === + var t1 = 10; >t1 : number >10 : number @@ -10,54 +11,39 @@ var t2 = 10; var s; >s : any -`Exp: ${t1 ** t2} abc`; ->`Exp: ${t1 ** t2} abc` : string +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +>`${t1 ** t2}` : string >t1 ** t2 : number >t1 : number >t2 : number -`Exp: ${t1 ** t2 ** t1} abc`; ->`Exp: ${t1 ** t2 ** t1} abc` : string +`${t1 ** t2 ** t1}`; +>`${t1 ** t2 ** t1}` : string >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number >t2 : number >t1 : number -`Exp: ${t1 + t2 ** t1} abc`; ->`Exp: ${t1 + t2 ** t1} abc` : string +`${t1 + t2 ** t1}`; +>`${t1 + t2 ** t1}` : string >t1 + t2 ** t1 : number >t1 : number >t2 ** t1 : number >t2 : number >t1 : number -`Exp: ${t1 - t2 ** t1} abc`; ->`Exp: ${t1 - t2 ** t1} abc` : string ->t1 - t2 ** t1 : number ->t1 : number ->t2 ** t1 : number ->t2 : number ->t1 : number - -`Exp: ${t1 ** t2 + t1} abc`; ->`Exp: ${t1 ** t2 + t1} abc` : string +`${t1 ** t2 + t1}`; +>`${t1 ** t2 + t1}` : string >t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number >t2 : number >t1 : number -`Exp: ${t1 ** t2 - t1} abc`; ->`Exp: ${t1 ** t2 - t1} abc` : string ->t1 ** t2 - t1 : number ->t1 ** t2 : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${t1 + t2 ** t2 + t1} abc`; ->`Exp: ${t1 + t2 ** t2 + t1} abc` : string +`${t1 + t2 ** t2 + t1 }`; +>`${t1 + t2 ** t2 + t1 }` : string >t1 + t2 ** t2 + t1 : number >t1 + t2 ** t2 : number >t1 : number @@ -66,183 +52,189 @@ var s; >t2 : number >t1 : number -`Exp: ${t1 - t2 ** t2 - t1} abc`; ->`Exp: ${t1 - t2 ** t2 - t1} abc` : string ->t1 - t2 ** t2 - t1 : number ->t1 - t2 ** t2 : number +`${typeof (t1 ** t2 ** t1) }`; +>`${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${1 + typeof (t1 ** t2 ** t1) }`; +>`${1 + typeof (t1 ** t2 ** t1) }` : string +>1 + typeof (t1 ** t2 ** t1) : string +>1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2}${t1 ** t2}`; +>`${t1 ** t2}${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>`${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>`${t1 + t2 ** t1}${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>`${t1 ** t2 + t1}${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number >t1 : number >t2 ** t2 : number >t2 : number >t2 : number >t1 : number -`Exp: ${-t1 ** t2 - t1} abc`; ->`Exp: ${-t1 ** t2 - t1} abc` : string ->-t1 ** t2 - t1 : number ->-t1 ** t2 : number ->t1 ** t2 : number +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; +>`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number >t1 : number +>t2 ** t1 : number >t2 : number >t1 : number - -`Exp: ${+t1 ** t2 - t1} abc`; ->`Exp: ${+t1 ** t2 - t1} abc` : string ->+t1 ** t2 - t1 : number ->+t1 ** t2 : number ->t1 ** t2 : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${-++t1 ** t2 - t1} abc`; ->`Exp: ${-++t1 ** t2 - t1} abc` : string ->-++t1 ** t2 - t1 : number ->-++t1 ** t2 : number ->++t1 ** t2 : number ->++t1 : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${+--t1 ** t2 - t1} abc`; ->`Exp: ${+--t1 ** t2 - t1} abc` : string ->+--t1 ** t2 - t1 : number ->+--t1 ** t2 : number ->--t1 ** t2 : number ->--t1 : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${-t1++ ** t2 - t1} abc`; ->`Exp: ${-t1++ ** t2 - t1} abc` : string ->-t1++ ** t2 - t1 : number ->-t1++ ** t2 : number ->t1++ ** t2 : number ->t1++ : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${-t1-- ** t2 - t1} abc`; ->`Exp: ${-t1-- ** t2 - t1} abc` : string ->-t1-- ** t2 - t1 : number ->-t1-- ** t2 : number ->t1-- ** t2 : number ->t1-- : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${+t1++ ** t2 - t1} abc`; ->`Exp: ${+t1++ ** t2 - t1} abc` : string ->+t1++ ** t2 - t1 : number ->+t1++ ** t2 : number ->t1++ ** t2 : number ->t1++ : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${+t1-- ** t2 - t1} abc`; ->`Exp: ${+t1-- ** t2 - t1} abc` : string ->+t1-- ** t2 - t1 : number ->+t1-- ** t2 : number ->t1-- ** t2 : number ->t1-- : number ->t1 : number ->t2 : number ->t1 : number - -`Exp: ${typeof t1 ** t2 ** t1} abc`; ->`Exp: ${typeof t1 ** t2 ** t1} abc` : string ->typeof t1 ** t2 ** t1 : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number >t2 : number >t1 : number -`Exp: ${typeof t1 ** t2 + t1} abc`; ->`Exp: ${typeof t1 ** t2 + t1} abc` : string ->typeof t1 ** t2 + t1 : string ->typeof t1 ** t2 : string +`${t1 ** t2} hello world ${t1 ** t2}`; +>`${t1 ** t2} hello world ${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number >t1 ** t2 : number >t1 : number >t2 : number >t1 : number -`Exp: ${typeof t1 ** (t2 - t1)} abc`; ->`Exp: ${typeof t1 ** (t2 - t1)} abc` : string ->typeof t1 ** (t2 - t1) : string ->t1 ** (t2 - t1) : number +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number >t1 : number ->(t2 - t1) : number ->t2 - t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number >t2 : number >t1 : number -`Exp: ${1 + typeof t1 ** t2 ** t1} abc`; ->`Exp: ${1 + typeof t1 ** t2 ** t1} abc` : string ->1 + typeof t1 ** t2 ** t1 : string ->1 : number ->typeof t1 ** t2 ** t1 : string +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number >t1 ** t2 ** t1 : number >t1 : number >t2 ** t1 : number >t2 : number >t1 : number -`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc`; ->`Exp: ${2 + typeof t1 ** t2 ** ++t1} abc` : string ->2 + typeof t1 ** t2 ** ++t1 : string ->2 : number ->typeof t1 ** t2 ** ++t1 : string ->t1 ** t2 ** ++t1 : number ->t1 : number ->t2 ** ++t1 : number ->t2 : number ->++t1 : number ->t1 : number - -`Exp: ${3 + typeof t1 ** t2 ** --t1} abc`; ->`Exp: ${3 + typeof t1 ** t2 ** --t1} abc` : string ->3 + typeof t1 ** t2 ** --t1 : string ->3 : number ->typeof t1 ** t2 ** --t1 : string ->t1 ** t2 ** --t1 : number ->t1 : number ->t2 ** --t1 : number ->t2 : number ->--t1 : number ->t1 : number - -`Exp: ${!t1 ** t2 ** t1} abc`; ->`Exp: ${!t1 ** t2 ** t1} abc` : string ->!t1 ** t2 ** t1 : boolean ->t1 ** t2 ** t1 : number ->t1 : number ->t2 ** t1 : number ->t2 : number ->t1 : number - -`Exp: ${!t1 ** t2 ** ++t1} abc`; ->`Exp: ${!t1 ** t2 ** ++t1} abc` : string ->!t1 ** t2 ** ++t1 : boolean ->t1 ** t2 ** ++t1 : number ->t1 : number ->t2 ** ++t1 : number ->t2 : number ->++t1 : number ->t1 : number - -`Exp: ${!t1 ** t2 ** --t1} abc`; ->`Exp: ${!t1 ** t2 ** --t1} abc` : string ->!t1 ** t2 ** --t1 : boolean ->t1 ** t2 ** --t1 : number ->t1 : number ->t2 ** --t1 : number ->t2 : number ->--t1 : number ->t1 : number - diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.js b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.js new file mode 100644 index 00000000000..d32caf45106 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.js @@ -0,0 +1,53 @@ +//// [emitExponentiationOperatorInTemplateString1ES6.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +`${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1 }`; +`${typeof (t1 ** t2 ** t1) }`; +`${1 + typeof (t1 ** t2 ** t1) }`; + +`${t1 ** t2}${t1 ** t2}`; +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; + +`${t1 ** t2} hello world ${t1 ** t2}`; +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; + +//// [emitExponentiationOperatorInTemplateString1ES6.js] +var t1 = 10; +var t2 = 10; +var s; +// TempateHead & TemplateTail are empty +`${Math.pow(t1, t2)}`; +`${Math.pow(t1, Math.pow(t2, t1))}`; +`${t1 + Math.pow(t2, t1)}`; +`${Math.pow(t1, t2) + t1}`; +`${t1 + Math.pow(t2, t2) + t1}`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +`${1 + typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +`${Math.pow(t1, t2)}${Math.pow(t1, t2)}`; +`${Math.pow(t1, Math.pow(t2, t1))}${Math.pow(t1, Math.pow(t2, t1))}`; +`${t1 + Math.pow(t2, t1)}${t1 + Math.pow(t2, t1)}`; +`${Math.pow(t1, t2) + t1}${Math.pow(t1, t2) + t1}`; +`${t1 + Math.pow(t2, t2) + t1}${t1 + Math.pow(t2, t2) + t1}`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))}${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +`${Math.pow(t1, t2)} hello world ${Math.pow(t1, t2)}`; +`${Math.pow(t1, Math.pow(t2, t1))} hello world ${Math.pow(t1, Math.pow(t2, t1))}`; +`${t1 + Math.pow(t2, t1)} hello world ${t1 + Math.pow(t2, t1)}`; +`${Math.pow(t1, t2) + t1} hello world ${Math.pow(t1, t2) + t1}`; +`${t1 + Math.pow(t2, t2) + t1} hello world ${t1 + Math.pow(t2, t2) + t1}`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))} hello world ${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.symbols b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.symbols new file mode 100644 index 00000000000..7b07fa26bba --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.symbols @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1ES6.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 3, 3)) + +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) + +`${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${1 + typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 ** t2}${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 ** t2} hello world ${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1ES6.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types new file mode 100644 index 00000000000..c2ee01ff23f --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString1ES6.types @@ -0,0 +1,240 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1ES6.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// TempateHead & TemplateTail are empty +`${t1 ** t2}`; +>`${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1}`; +>`${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1}`; +>`${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1}`; +>`${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1 }`; +>`${t1 + t2 ** t2 + t1 }` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) }`; +>`${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${1 + typeof (t1 ** t2 ** t1) }`; +>`${1 + typeof (t1 ** t2 ** t1) }` : string +>1 + typeof (t1 ** t2 ** t1) : string +>1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2}${t1 ** t2}`; +>`${t1 ** t2}${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>`${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>`${t1 + t2 ** t1}${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>`${t1 ** t2 + t1}${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}`; +>`${typeof (t1 ** t2 ** t1)}${typeof (t1 ** t2 ** t1)}` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2} hello world ${t1 ** t2}`; +>`${t1 ** t2} hello world ${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.js b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.js new file mode 100644 index 00000000000..73384762706 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.js @@ -0,0 +1,53 @@ +//// [emitExponentiationOperatorInTemplateString2.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// With templateHead +`hello ${t1 ** t2}`; +`hello ${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1 }`; +`hello ${typeof (t1 ** t2 ** t1) }`; +`hello ${1 + typeof (t1 ** t2 ** t1) }`; + +`hello ${t1 ** t2}${t1 ** t2}`; +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; + +//// [emitExponentiationOperatorInTemplateString2.js] +var t1 = 10; +var t2 = 10; +var s; +// With templateHead +"hello " + (Math.pow(t1, t2)); +"hello " + (Math.pow(t1, Math.pow(t2, t1))); +"hello " + (t1 + Math.pow(t2, t1)); +"hello " + (Math.pow(t1, t2) + t1); +"hello " + (t1 + Math.pow(t2, t2) + t1); +"hello " + typeof (Math.pow(t1, Math.pow(t2, t1))); +"hello " + (1 + typeof (Math.pow(t1, Math.pow(t2, t1)))); +"hello " + (Math.pow(t1, t2)) + (Math.pow(t1, t2)); +"hello " + (Math.pow(t1, Math.pow(t2, t1))) + (Math.pow(t1, Math.pow(t2, t1))); +"hello " + (t1 + Math.pow(t2, t1)) + (t1 + Math.pow(t2, t1)); +"hello " + (Math.pow(t1, t2) + t1) + (Math.pow(t1, t2) + t1); +"hello " + (t1 + Math.pow(t2, t2) + t1) + (t1 + Math.pow(t2, t2) + t1); +"hello " + typeof (Math.pow(t1, Math.pow(t2, t1))) + typeof (Math.pow(t1, Math.pow(t2, t1))); +"hello " + (Math.pow(t1, t2)) + " hello world " + (Math.pow(t1, t2)); +"hello " + (Math.pow(t1, Math.pow(t2, t1))) + " hello world " + (Math.pow(t1, Math.pow(t2, t1))); +"hello " + (t1 + Math.pow(t2, t1)) + " hello world " + (t1 + Math.pow(t2, t1)); +"hello " + (Math.pow(t1, t2) + t1) + " hello world " + (Math.pow(t1, t2) + t1); +"hello " + (t1 + Math.pow(t2, t2) + t1) + " hello world " + (t1 + Math.pow(t2, t2) + t1); +"hello " + typeof (Math.pow(t1, Math.pow(t2, t1))) + " hello world " + typeof (Math.pow(t1, Math.pow(t2, t1))); diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.symbols b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.symbols new file mode 100644 index 00000000000..224499c1289 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.symbols @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString2.ts, 3, 3)) + +// With templateHead +`hello ${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) + +`hello ${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 + t2 ** t2 + t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${1 + typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 ** t2}${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) + +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) + +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types new file mode 100644 index 00000000000..05816e94c6c --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2.types @@ -0,0 +1,240 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// With templateHead +`hello ${t1 ** t2}`; +>`hello ${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number + +`hello ${t1 ** t2 ** t1}`; +>`hello ${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t1}`; +>`hello ${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2 + t1}`; +>`hello ${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t2 + t1 }`; +>`hello ${t1 + t2 ** t2 + t1 }` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1) }`; +>`hello ${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${1 + typeof (t1 ** t2 ** t1) }`; +>`hello ${1 + typeof (t1 ** t2 ** t1) }` : string +>1 + typeof (t1 ** t2 ** t1) : string +>1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2}${t1 ** t2}`; +>`hello ${t1 ** t2}${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; +>`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +>`hello ${t1 ** t2} hello world ${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.js b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.js new file mode 100644 index 00000000000..ac92b4598aa --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.js @@ -0,0 +1,53 @@ +//// [emitExponentiationOperatorInTemplateString2ES6.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// With templateHead +`hello ${t1 ** t2}`; +`hello ${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1 }`; +`hello ${typeof (t1 ** t2 ** t1) }`; +`hello ${1 + typeof (t1 ** t2 ** t1) }`; + +`hello ${t1 ** t2}${t1 ** t2}`; +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; + +//// [emitExponentiationOperatorInTemplateString2ES6.js] +var t1 = 10; +var t2 = 10; +var s; +// With templateHead +`hello ${Math.pow(t1, t2)}`; +`hello ${Math.pow(t1, Math.pow(t2, t1))}`; +`hello ${t1 + Math.pow(t2, t1)}`; +`hello ${Math.pow(t1, t2) + t1}`; +`hello ${t1 + Math.pow(t2, t2) + t1}`; +`hello ${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +`hello ${1 + typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +`hello ${Math.pow(t1, t2)}${Math.pow(t1, t2)}`; +`hello ${Math.pow(t1, Math.pow(t2, t1))}${Math.pow(t1, Math.pow(t2, t1))}`; +`hello ${t1 + Math.pow(t2, t1)}${t1 + Math.pow(t2, t1)}`; +`hello ${Math.pow(t1, t2) + t1}${Math.pow(t1, t2) + t1}`; +`hello ${t1 + Math.pow(t2, t2) + t1}${t1 + Math.pow(t2, t2) + t1}`; +`hello ${typeof (Math.pow(t1, Math.pow(t2, t1)))}${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; +`hello ${Math.pow(t1, t2)} hello world ${Math.pow(t1, t2)}`; +`hello ${Math.pow(t1, Math.pow(t2, t1))} hello world ${Math.pow(t1, Math.pow(t2, t1))}`; +`hello ${t1 + Math.pow(t2, t1)} hello world ${t1 + Math.pow(t2, t1)}`; +`hello ${Math.pow(t1, t2) + t1} hello world ${Math.pow(t1, t2) + t1}`; +`hello ${t1 + Math.pow(t2, t2) + t1} hello world ${t1 + Math.pow(t2, t2) + t1}`; +`hello ${typeof (Math.pow(t1, Math.pow(t2, t1)))} hello world ${typeof (Math.pow(t1, Math.pow(t2, t1)))}`; diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.symbols b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.symbols new file mode 100644 index 00000000000..fd674b21d33 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.symbols @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2ES6.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 3, 3)) + +// With templateHead +`hello ${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) + +`hello ${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 + t2 ** t2 + t1 }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${1 + typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 ** t2}${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) + +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) + +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString2ES6.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types new file mode 100644 index 00000000000..b77e38587c2 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString2ES6.types @@ -0,0 +1,240 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString2ES6.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// With templateHead +`hello ${t1 ** t2}`; +>`hello ${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number + +`hello ${t1 ** t2 ** t1}`; +>`hello ${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t1}`; +>`hello ${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2 + t1}`; +>`hello ${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t2 + t1 }`; +>`hello ${t1 + t2 ** t2 + t1 }` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1) }`; +>`hello ${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${1 + typeof (t1 ** t2 ** t1) }`; +>`hello ${1 + typeof (t1 ** t2 ** t1) }` : string +>1 + typeof (t1 ** t2 ** t1) : string +>1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2}${t1 ** t2}`; +>`hello ${t1 ** t2}${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}`; +>`hello ${t1 ** t2 ** t1}${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}`; +>`hello ${t1 + t2 ** t1}${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}`; +>`hello ${t1 ** t2 + t1}${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}`; +>`hello ${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }`; +>`hello ${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2} hello world ${t1 ** t2}`; +>`hello ${t1 ** t2} hello world ${t1 ** t2}` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}`; +>`hello ${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1}` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}`; +>`hello ${t1 + t2 ** t1} hello world ${t1 + t2 ** t1}` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}`; +>`hello ${t1 ** t2 + t1} hello world ${t1 ** t2 + t1}` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}`; +>`hello ${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1}` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }`; +>`hello ${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1) }` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.js b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.js new file mode 100644 index 00000000000..9c3b937d94b --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.js @@ -0,0 +1,54 @@ +//// [emitExponentiationOperatorInTemplateString3.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// With TemplateTail +`${t1 ** t2} world`; +`${t1 ** t2 ** t1} world`; +`${t1 + t2 ** t1} world`; +`${t1 ** t2 + t1} world`; +`${t1 + t2 ** t2 + t1 } world`; +`${typeof (t1 ** t2 ** t1) } world`; +`${1 + typeof (t1 ** t2 ** t1) } world`; + +`${t1 ** t2}${t1 ** t2} world`; +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; + + +//// [emitExponentiationOperatorInTemplateString3.js] +var t1 = 10; +var t2 = 10; +var s; +// With TemplateTail +(Math.pow(t1, t2)) + " world"; +(Math.pow(t1, Math.pow(t2, t1))) + " world"; +(t1 + Math.pow(t2, t1)) + " world"; +(Math.pow(t1, t2) + t1) + " world"; +(t1 + Math.pow(t2, t2) + t1) + " world"; +typeof (Math.pow(t1, Math.pow(t2, t1))) + " world"; +(1 + typeof (Math.pow(t1, Math.pow(t2, t1)))) + " world"; +"" + (Math.pow(t1, t2)) + (Math.pow(t1, t2)) + " world"; +"" + (Math.pow(t1, Math.pow(t2, t1))) + (Math.pow(t1, Math.pow(t2, t1))) + " world"; +"" + (t1 + Math.pow(t2, t1)) + (t1 + Math.pow(t2, t1)) + " world"; +"" + (Math.pow(t1, t2) + t1) + (Math.pow(t1, t2) + t1) + " world"; +"" + (t1 + Math.pow(t2, t2) + t1) + (t1 + Math.pow(t2, t2) + t1) + " world"; +"" + typeof (Math.pow(t1, Math.pow(t2, t1))) + typeof (Math.pow(t1, Math.pow(t2, t1))) + " world"; +(Math.pow(t1, t2)) + " hello world " + (Math.pow(t1, t2)) + " !!"; +(Math.pow(t1, Math.pow(t2, t1))) + " hello world " + (Math.pow(t1, Math.pow(t2, t1))) + " !!"; +(t1 + Math.pow(t2, t1)) + " hello world " + (t1 + Math.pow(t2, t1)) + " !!"; +(Math.pow(t1, t2) + t1) + " hello world " + (Math.pow(t1, t2) + t1) + " !!"; +(t1 + Math.pow(t2, t2) + t1) + " hello world " + (t1 + Math.pow(t2, t2) + t1) + " !!"; +typeof (Math.pow(t1, Math.pow(t2, t1))) + " hello world " + typeof (Math.pow(t1, Math.pow(t2, t1))) + " !!"; diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.symbols b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.symbols new file mode 100644 index 00000000000..758a0e2956b --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.symbols @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString3.ts, 3, 3)) + +// With TemplateTail +`${t1 ** t2} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) + +`${t1 ** t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 + t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 ** t2 + t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1 } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${1 + typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 ** t2}${t1 ** t2} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types new file mode 100644 index 00000000000..88c23ee8a0b --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3.types @@ -0,0 +1,240 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// With TemplateTail +`${t1 ** t2} world`; +>`${t1 ** t2} world` : string +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1} world`; +>`${t1 ** t2 ** t1} world` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1} world`; +>`${t1 + t2 ** t1} world` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1} world`; +>`${t1 ** t2 + t1} world` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1 } world`; +>`${t1 + t2 ** t2 + t1 } world` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } world`; +>`${typeof (t1 ** t2 ** t1) } world` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${1 + typeof (t1 ** t2 ** t1) } world`; +>`${1 + typeof (t1 ** t2 ** t1) } world` : string +>1 + typeof (t1 ** t2 ** t1) : string +>1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2}${t1 ** t2} world`; +>`${t1 ** t2}${t1 ** t2} world` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +>`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +>`${t1 + t2 ** t1}${t1 + t2 ** t1} world` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +>`${t1 ** t2 + t1}${t1 ** t2 + t1} world` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +>`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; +>`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +>`${t1 ** t2} hello world ${t1 ** t2} !!` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +>`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +>`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +>`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +>`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; +>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.js b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.js new file mode 100644 index 00000000000..ec037dd2150 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.js @@ -0,0 +1,54 @@ +//// [emitExponentiationOperatorInTemplateString3ES6.ts] + +var t1 = 10; +var t2 = 10; +var s; + +// With TemplateTail +`${t1 ** t2} world`; +`${t1 ** t2 ** t1} world`; +`${t1 + t2 ** t1} world`; +`${t1 ** t2 + t1} world`; +`${t1 + t2 ** t2 + t1 } world`; +`${typeof (t1 ** t2 ** t1) } world`; +`${1 + typeof (t1 ** t2 ** t1) } world`; + +`${t1 ** t2}${t1 ** t2} world`; +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; + + +//// [emitExponentiationOperatorInTemplateString3ES6.js] +var t1 = 10; +var t2 = 10; +var s; +// With TemplateTail +`${Math.pow(t1, t2)} world`; +`${Math.pow(t1, Math.pow(t2, t1))} world`; +`${t1 + Math.pow(t2, t1)} world`; +`${Math.pow(t1, t2) + t1} world`; +`${t1 + Math.pow(t2, t2) + t1} world`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))} world`; +`${1 + typeof (Math.pow(t1, Math.pow(t2, t1)))} world`; +`${Math.pow(t1, t2)}${Math.pow(t1, t2)} world`; +`${Math.pow(t1, Math.pow(t2, t1))}${Math.pow(t1, Math.pow(t2, t1))} world`; +`${t1 + Math.pow(t2, t1)}${t1 + Math.pow(t2, t1)} world`; +`${Math.pow(t1, t2) + t1}${Math.pow(t1, t2) + t1} world`; +`${t1 + Math.pow(t2, t2) + t1}${t1 + Math.pow(t2, t2) + t1} world`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))}${typeof (Math.pow(t1, Math.pow(t2, t1)))} world`; +`${Math.pow(t1, t2)} hello world ${Math.pow(t1, t2)} !!`; +`${Math.pow(t1, Math.pow(t2, t1))} hello world ${Math.pow(t1, Math.pow(t2, t1))} !!`; +`${t1 + Math.pow(t2, t1)} hello world ${t1 + Math.pow(t2, t1)} !!`; +`${Math.pow(t1, t2) + t1} hello world ${Math.pow(t1, t2) + t1} !!`; +`${t1 + Math.pow(t2, t2) + t1} hello world ${t1 + Math.pow(t2, t2) + t1} !!`; +`${typeof (Math.pow(t1, Math.pow(t2, t1)))} hello world ${typeof (Math.pow(t1, Math.pow(t2, t1)))} !!`; diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.symbols b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.symbols new file mode 100644 index 00000000000..a6062348432 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.symbols @@ -0,0 +1,143 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3ES6.ts === + +var t1 = 10; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +var t2 = 10; +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) + +var s; +>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 3, 3)) + +// With TemplateTail +`${t1 ** t2} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) + +`${t1 ** t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 + t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 ** t2 + t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1 } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${1 + typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 ** t2}${t1 ** t2} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) +>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 2, 3)) +>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString3ES6.ts, 1, 3)) + diff --git a/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types new file mode 100644 index 00000000000..e0d59cc1319 --- /dev/null +++ b/tests/baselines/reference/emitExponentiationOperatorInTemplateString3ES6.types @@ -0,0 +1,240 @@ +=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString3ES6.ts === + +var t1 = 10; +>t1 : number +>10 : number + +var t2 = 10; +>t2 : number +>10 : number + +var s; +>s : any + +// With TemplateTail +`${t1 ** t2} world`; +>`${t1 ** t2} world` : string +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1} world`; +>`${t1 ** t2 ** t1} world` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1} world`; +>`${t1 + t2 ** t1} world` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1} world`; +>`${t1 ** t2 + t1} world` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1 } world`; +>`${t1 + t2 ** t2 + t1 } world` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } world`; +>`${typeof (t1 ** t2 ** t1) } world` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${1 + typeof (t1 ** t2 ** t1) } world`; +>`${1 + typeof (t1 ** t2 ** t1) } world` : string +>1 + typeof (t1 ** t2 ** t1) : string +>1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2}${t1 ** t2} world`; +>`${t1 ** t2}${t1 ** t2} world` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world`; +>`${t1 ** t2 ** t1}${t1 ** t2 ** t1} world` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1}${t1 + t2 ** t1} world`; +>`${t1 + t2 ** t1}${t1 + t2 ** t1} world` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1}${t1 ** t2 + t1} world`; +>`${t1 ** t2 + t1}${t1 ** t2 + t1} world` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world`; +>`${t1 + t2 ** t2 + t1}${t1 + t2 ** t2 + t1} world` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world`; +>`${typeof (t1 ** t2 ** t1) }${typeof (t1 ** t2 ** t1) } world` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2} hello world ${t1 ** t2} !!`; +>`${t1 ** t2} hello world ${t1 ** t2} !!` : string +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 ** t2 : number +>t1 : number +>t2 : number + +`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!`; +>`${t1 ** t2 ** t1} hello world ${t1 ** t2 ** t1} !!` : string +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!`; +>`${t1 + t2 ** t1} hello world ${t1 + t2 ** t1} !!` : string +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>t1 + t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number + +`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!`; +>`${t1 ** t2 + t1} hello world ${t1 ** t2 + t1} !!` : string +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number +>t1 ** t2 + t1 : number +>t1 ** t2 : number +>t1 : number +>t2 : number +>t1 : number + +`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!`; +>`${t1 + t2 ** t2 + t1} hello world ${t1 + t2 ** t2 + t1} !!` : string +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number +>t1 + t2 ** t2 + t1 : number +>t1 + t2 ** t2 : number +>t1 : number +>t2 ** t2 : number +>t2 : number +>t2 : number +>t1 : number + +`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!`; +>`${typeof (t1 ** t2 ** t1) } hello world ${typeof (t1 ** t2 ** t1)} !!` : string +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +>typeof (t1 ** t2 ** t1) : string +>(t1 ** t2 ** t1) : number +>t1 ** t2 ** t1 : number +>t1 : number +>t2 ** t1 : number +>t2 : number +>t1 : number +