mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
Merge branch 'master' into tscJsFiles
This commit is contained in:
commit
acf7de7d34
@ -1,6 +1,7 @@
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- '4'
|
||||
- '0.10'
|
||||
|
||||
sudo: false
|
||||
sudo: false
|
||||
|
||||
29
lib/lib.core.es6.d.ts
vendored
29
lib/lib.core.es6.d.ts
vendored
@ -3965,34 +3965,7 @@ interface ObjectConstructor {
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param source The source object from which to copy properties.
|
||||
*/
|
||||
assign<T, U>(target: T, source: U): T & U;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param source1 The first source object from which to copy properties.
|
||||
* @param source2 The second source object from which to copy properties.
|
||||
*/
|
||||
assign<T, U, V>(target: T, source1: U, source2: V): T & U & V;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param source1 The first source object from which to copy properties.
|
||||
* @param source2 The second source object from which to copy properties.
|
||||
* @param source3 The third source object from which to copy properties.
|
||||
*/
|
||||
assign<T, U, V, W>(target: T, source1: U, source2: V, source3: W): T & U & V & W;
|
||||
|
||||
/**
|
||||
* Copy the values of all of the enumerable own properties from one or more source objects to a
|
||||
* target object. Returns the target object.
|
||||
* @param target The target object to copy to.
|
||||
* @param sources One or more source objects from which to copy properties
|
||||
* @param sources One or more source objects to copy properties from.
|
||||
*/
|
||||
assign(target: any, ...sources: any[]): any;
|
||||
|
||||
|
||||
@ -383,20 +383,72 @@ namespace ts {
|
||||
// return undefined if we can't find a symbol.
|
||||
}
|
||||
|
||||
/** Returns true if node1 is defined before node 2**/
|
||||
function isDefinedBefore(node1: Node, node2: Node): boolean {
|
||||
let file1 = getSourceFileOfNode(node1);
|
||||
let file2 = getSourceFileOfNode(node2);
|
||||
if (file1 === file2) {
|
||||
return node1.pos <= node2.pos;
|
||||
function isBlockScopedNameDeclaredBeforeUse(declaration: Declaration, usage: Node): boolean {
|
||||
const declarationFile = getSourceFileOfNode(declaration);
|
||||
const useFile = getSourceFileOfNode(usage);
|
||||
if (declarationFile !== useFile) {
|
||||
if (modulekind || (!compilerOptions.outFile && !compilerOptions.out)) {
|
||||
// nodes are in different files and order cannot be determines
|
||||
return true;
|
||||
}
|
||||
|
||||
const sourceFiles = host.getSourceFiles();
|
||||
return indexOf(sourceFiles, declarationFile) <= indexOf(sourceFiles, useFile);
|
||||
}
|
||||
|
||||
if (!compilerOptions.outFile && !compilerOptions.out) {
|
||||
return true;
|
||||
if (declaration.pos <= usage.pos) {
|
||||
// declaration is before usage
|
||||
// still might be illegal if usage is in the initializer of the variable declaration
|
||||
return declaration.kind !== SyntaxKind.VariableDeclaration ||
|
||||
!isImmediatelyUsedInInitializerOfBlockScopedVariable(<VariableDeclaration>declaration, usage);
|
||||
}
|
||||
|
||||
let sourceFiles = host.getSourceFiles();
|
||||
return indexOf(sourceFiles, file1) <= indexOf(sourceFiles, file2);
|
||||
// declaration is after usage
|
||||
// can be legal if usage is deferred (i.e. inside function or in initializer of instance property)
|
||||
return isUsedInFunctionOrNonStaticProperty(declaration, usage);
|
||||
|
||||
function isImmediatelyUsedInInitializerOfBlockScopedVariable(declaration: VariableDeclaration, usage: Node): boolean {
|
||||
const container = getEnclosingBlockScopeContainer(declaration);
|
||||
|
||||
if (declaration.parent.parent.kind === SyntaxKind.VariableStatement ||
|
||||
declaration.parent.parent.kind === SyntaxKind.ForStatement) {
|
||||
// variable statement/for statement case,
|
||||
// use site should not be inside variable declaration (initializer of declaration or binding element)
|
||||
return isSameScopeDescendentOf(usage, declaration, container);
|
||||
}
|
||||
else if (declaration.parent.parent.kind === SyntaxKind.ForOfStatement ||
|
||||
declaration.parent.parent.kind === SyntaxKind.ForInStatement) {
|
||||
// ForIn/ForOf case - use site should not be used in expression part
|
||||
let expression = (<ForInStatement | ForOfStatement>declaration.parent.parent).expression;
|
||||
return isSameScopeDescendentOf(usage, expression, container);
|
||||
}
|
||||
}
|
||||
|
||||
function isUsedInFunctionOrNonStaticProperty(declaration: Declaration, usage: Node): boolean {
|
||||
const container = getEnclosingBlockScopeContainer(declaration);
|
||||
let current = usage;
|
||||
while (current) {
|
||||
if (current === container) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (isFunctionLike(current)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const initializerOfNonStaticProperty = current.parent &&
|
||||
current.parent.kind === SyntaxKind.PropertyDeclaration &&
|
||||
(current.parent.flags & NodeFlags.Static) === 0 &&
|
||||
(<PropertyDeclaration>current.parent).initializer === current;
|
||||
|
||||
if (initializerOfNonStaticProperty) {
|
||||
return true;
|
||||
}
|
||||
|
||||
current = current.parent;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Resolve a given name for a given meaning at a given location. An error is reported if the name was not found and
|
||||
@ -627,34 +679,7 @@ namespace ts {
|
||||
|
||||
Debug.assert(declaration !== undefined, "Block-scoped variable declaration is undefined");
|
||||
|
||||
// first check if usage is lexically located after the declaration
|
||||
let isUsedBeforeDeclaration = !isDefinedBefore(declaration, errorLocation);
|
||||
if (!isUsedBeforeDeclaration) {
|
||||
// lexical check succeeded however code still can be illegal.
|
||||
// - block scoped variables cannot be used in its initializers
|
||||
// let x = x; // illegal but usage is lexically after definition
|
||||
// - in ForIn/ForOf statements variable cannot be contained in expression part
|
||||
// for (let x in x)
|
||||
// for (let x of x)
|
||||
|
||||
// climb up to the variable declaration skipping binding patterns
|
||||
let variableDeclaration = <VariableDeclaration>getAncestor(declaration, SyntaxKind.VariableDeclaration);
|
||||
let container = getEnclosingBlockScopeContainer(variableDeclaration);
|
||||
|
||||
if (variableDeclaration.parent.parent.kind === SyntaxKind.VariableStatement ||
|
||||
variableDeclaration.parent.parent.kind === SyntaxKind.ForStatement) {
|
||||
// variable statement/for statement case,
|
||||
// use site should not be inside variable declaration (initializer of declaration or binding element)
|
||||
isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, variableDeclaration, container);
|
||||
}
|
||||
else if (variableDeclaration.parent.parent.kind === SyntaxKind.ForOfStatement ||
|
||||
variableDeclaration.parent.parent.kind === SyntaxKind.ForInStatement) {
|
||||
// ForIn/ForOf case - use site should not be used in expression part
|
||||
let expression = (<ForInStatement | ForOfStatement>variableDeclaration.parent.parent).expression;
|
||||
isUsedBeforeDeclaration = isSameScopeDescendentOf(errorLocation, expression, container);
|
||||
}
|
||||
}
|
||||
if (isUsedBeforeDeclaration) {
|
||||
if (!isBlockScopedNameDeclaredBeforeUse(<Declaration>getAncestor(declaration, SyntaxKind.VariableDeclaration), errorLocation)) {
|
||||
error(errorLocation, Diagnostics.Block_scoped_variable_0_used_before_its_declaration, declarationNameToString(declaration.name));
|
||||
}
|
||||
}
|
||||
@ -7984,6 +8009,11 @@ namespace ts {
|
||||
return true;
|
||||
}
|
||||
// An instance property must be accessed through an instance of the enclosing class
|
||||
if (type.flags & TypeFlags.ThisType) {
|
||||
// get the original type -- represented as the type constraint of the 'this' type
|
||||
type = getConstraintOfTypeParameter(<TypeParameter>type);
|
||||
}
|
||||
|
||||
// TODO: why is the first part of this check here?
|
||||
if (!(getTargetType(type).flags & (TypeFlags.Class | TypeFlags.Interface) && hasBaseType(<InterfaceType>type, enclosingClass))) {
|
||||
error(node, Diagnostics.Property_0_is_protected_and_only_accessible_through_an_instance_of_class_1, symbolToString(prop), typeToString(enclosingClass));
|
||||
@ -10069,7 +10099,9 @@ namespace ts {
|
||||
let rightType = checkExpression(right, contextualMapper);
|
||||
switch (operator) {
|
||||
case SyntaxKind.AsteriskToken:
|
||||
case SyntaxKind.AsteriskAsteriskToken:
|
||||
case SyntaxKind.AsteriskEqualsToken:
|
||||
case SyntaxKind.AsteriskAsteriskEqualsToken:
|
||||
case SyntaxKind.SlashToken:
|
||||
case SyntaxKind.SlashEqualsToken:
|
||||
case SyntaxKind.PercentToken:
|
||||
@ -10088,7 +10120,7 @@ namespace ts {
|
||||
case SyntaxKind.CaretEqualsToken:
|
||||
case SyntaxKind.AmpersandToken:
|
||||
case SyntaxKind.AmpersandEqualsToken:
|
||||
// TypeScript 1.0 spec (April 2014): 4.15.1
|
||||
// TypeScript 1.0 spec (April 2014): 4.19.1
|
||||
// These operators require their operands to be of type Any, the Number primitive type,
|
||||
// or an enum type. Operands of an enum type are treated
|
||||
// as having the primitive type Number. If one operand is the null or undefined value,
|
||||
@ -10117,7 +10149,7 @@ namespace ts {
|
||||
return numberType;
|
||||
case SyntaxKind.PlusToken:
|
||||
case SyntaxKind.PlusEqualsToken:
|
||||
// TypeScript 1.0 spec (April 2014): 4.15.2
|
||||
// TypeScript 1.0 spec (April 2014): 4.19.2
|
||||
// The binary + operator requires both operands to be of the Number primitive type or an enum type,
|
||||
// or at least one of the operands to be of type Any or the String primitive type.
|
||||
|
||||
@ -11760,10 +11792,6 @@ namespace ts {
|
||||
checkSignatureDeclaration(node);
|
||||
let isAsync = isAsyncFunctionLike(node);
|
||||
if (isAsync) {
|
||||
if (!compilerOptions.experimentalAsyncFunctions) {
|
||||
error(node, Diagnostics.Experimental_support_for_async_functions_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalAsyncFunctions_to_remove_this_warning);
|
||||
}
|
||||
|
||||
emitAwaiter = true;
|
||||
}
|
||||
|
||||
@ -13358,7 +13386,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// illegal case: forward reference
|
||||
if (!isDefinedBefore(propertyDecl, member)) {
|
||||
if (!isBlockScopedNameDeclaredBeforeUse(propertyDecl, member)) {
|
||||
reportError = false;
|
||||
error(e, Diagnostics.A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums);
|
||||
return undefined;
|
||||
|
||||
@ -222,11 +222,6 @@ namespace ts {
|
||||
type: "boolean",
|
||||
description: Diagnostics.Watch_input_files,
|
||||
},
|
||||
{
|
||||
name: "experimentalAsyncFunctions",
|
||||
type: "boolean",
|
||||
description: Diagnostics.Enables_experimental_support_for_ES7_async_functions
|
||||
},
|
||||
{
|
||||
name: "experimentalDecorators",
|
||||
type: "boolean",
|
||||
@ -450,7 +445,7 @@ namespace ts {
|
||||
catch (e) {
|
||||
return { error: createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, fileName, e.message) };
|
||||
}
|
||||
return parseConfigFileText(fileName, text);
|
||||
return parseConfigFileTextToJson(fileName, text);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -458,7 +453,7 @@ namespace ts {
|
||||
* @param fileName The path to the config file
|
||||
* @param jsonText The text of the config file
|
||||
*/
|
||||
export function parseConfigFileText(fileName: string, jsonText: string): { config?: any; error?: Diagnostic } {
|
||||
export function parseConfigFileTextToJson(fileName: string, jsonText: string): { config?: any; error?: Diagnostic } {
|
||||
try {
|
||||
return { config: /\S/.test(jsonText) ? JSON.parse(jsonText) : {} };
|
||||
}
|
||||
@ -506,7 +501,7 @@ namespace ts {
|
||||
* file to. e.g. outDir
|
||||
* @param existingOptions optional existing options to extend into
|
||||
*/
|
||||
export function parseConfigFile(json: any, host: ParseConfigHost, basePath: string, existingOptions: CompilerOptions = {}): ParsedCommandLine {
|
||||
export function parseJsonConfigFileContent(json: any, host: ParseConfigHost, basePath: string, existingOptions: CompilerOptions = {}): ParsedCommandLine {
|
||||
let errors: Diagnostic[] = [];
|
||||
|
||||
let options = getCompilerOptions(existingOptions);
|
||||
|
||||
@ -437,8 +437,12 @@ namespace ts {
|
||||
}
|
||||
|
||||
export function concatenateDiagnosticMessageChains(headChain: DiagnosticMessageChain, tailChain: DiagnosticMessageChain): DiagnosticMessageChain {
|
||||
Debug.assert(!headChain.next);
|
||||
headChain.next = tailChain;
|
||||
let lastChain = headChain;
|
||||
while (lastChain.next) {
|
||||
lastChain = lastChain.next;
|
||||
}
|
||||
|
||||
lastChain.next = tailChain;
|
||||
return headChain;
|
||||
}
|
||||
|
||||
@ -700,6 +704,9 @@ namespace ts {
|
||||
}
|
||||
|
||||
export function getBaseFileName(path: string) {
|
||||
if (path === undefined) {
|
||||
return undefined;
|
||||
}
|
||||
let i = path.lastIndexOf(directorySeparator);
|
||||
return i < 0 ? path : path.substring(i + 1);
|
||||
}
|
||||
@ -723,6 +730,17 @@ namespace ts {
|
||||
*/
|
||||
export const supportedTypeScriptExtensions = ["ts", "tsx", "d.ts"];
|
||||
|
||||
export function isSupportedSourceFileName(fileName: string, compilerOptions?: CompilerOptions) {
|
||||
if (!fileName) { return false; }
|
||||
|
||||
for (let extension of getSupportedExtensions(compilerOptions)) {
|
||||
if (fileExtensionIs(fileName, extension)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
export function removeFileExtension(path: string, supportedExtensions: string[]): string {
|
||||
// Sort the extensions in descending order of their length
|
||||
let extensionsToRemove = supportedExtensions.slice(0, supportedExtensions.length) // Get duplicate array
|
||||
@ -819,4 +837,14 @@ namespace ts {
|
||||
Debug.assert(false, message);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function copyListRemovingItem<T>(item: T, list: T[]) {
|
||||
let copiedList: T[] = [];
|
||||
for (var i = 0, len = list.length; i < len; i++) {
|
||||
if (list[i] !== item) {
|
||||
copiedList.push(list[i]);
|
||||
}
|
||||
}
|
||||
return copiedList;
|
||||
}
|
||||
}
|
||||
|
||||
@ -783,10 +783,6 @@
|
||||
"category": "Error",
|
||||
"code": 1245
|
||||
},
|
||||
"Experimental support for async functions is a feature that is subject to change in a future release. Specify '--experimentalAsyncFunctions' to remove this warning.": {
|
||||
"category": "Error",
|
||||
"code": 1246
|
||||
},
|
||||
|
||||
"'with' statements are not allowed in an async function block.": {
|
||||
"category": "Error",
|
||||
@ -2298,10 +2294,6 @@
|
||||
"category": "Message",
|
||||
"code": 6066
|
||||
},
|
||||
"Option 'experimentalAsyncFunctions' cannot be specified when targeting ES5 or lower.": {
|
||||
"category": "Message",
|
||||
"code": 6067
|
||||
},
|
||||
"Enables experimental support for ES7 async functions.": {
|
||||
"category": "Message",
|
||||
"code": 6068
|
||||
@ -2497,5 +2489,13 @@
|
||||
"A constructor cannot contain a 'super' call when its class extends 'null'": {
|
||||
"category": "Error",
|
||||
"code": 17005
|
||||
},
|
||||
"An unary expression with the '{0}' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": {
|
||||
"category": "Error",
|
||||
"code": 17006
|
||||
},
|
||||
"A type assertion expression is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses.": {
|
||||
"category": "Error",
|
||||
"code": 17007
|
||||
}
|
||||
}
|
||||
|
||||
@ -2780,6 +2780,68 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Emit ES7 exponentiation operator downlevel using Math.pow
|
||||
* @param node a binary expression node containing exponentiationOperator (**, **=)
|
||||
*/
|
||||
function emitExponentiationOperator(node: BinaryExpression) {
|
||||
let leftHandSideExpression = node.left;
|
||||
if (node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken) {
|
||||
let synthesizedLHS: ElementAccessExpression | PropertyAccessExpression;
|
||||
let shouldEmitParentheses = false;
|
||||
if (isElementAccessExpression(leftHandSideExpression)) {
|
||||
shouldEmitParentheses = true;
|
||||
write("(");
|
||||
|
||||
synthesizedLHS = <ElementAccessExpression>createSynthesizedNode(SyntaxKind.ElementAccessExpression, /*startsOnNewLine*/ false);
|
||||
|
||||
let identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefinedTempVariablesInPlaces*/ false, /*shouldEmitCommaBeforeAssignment*/ false);
|
||||
synthesizedLHS.expression = identifier;
|
||||
|
||||
if (leftHandSideExpression.argumentExpression.kind !== SyntaxKind.NumericLiteral &&
|
||||
leftHandSideExpression.argumentExpression.kind !== SyntaxKind.StringLiteral) {
|
||||
let tempArgumentExpression = createAndRecordTempVariable(TempFlags._i);
|
||||
(<ElementAccessExpression>synthesizedLHS).argumentExpression = tempArgumentExpression;
|
||||
emitAssignment(tempArgumentExpression, leftHandSideExpression.argumentExpression, /*shouldEmitCommaBeforeAssignment*/ true);
|
||||
}
|
||||
else {
|
||||
(<ElementAccessExpression>synthesizedLHS).argumentExpression = leftHandSideExpression.argumentExpression;
|
||||
}
|
||||
write(", ");
|
||||
}
|
||||
else if (isPropertyAccessExpression(leftHandSideExpression)) {
|
||||
shouldEmitParentheses = true;
|
||||
write("(");
|
||||
synthesizedLHS = <PropertyAccessExpression>createSynthesizedNode(SyntaxKind.PropertyAccessExpression, /*startsOnNewLine*/ false);
|
||||
|
||||
let identifier = emitTempVariableAssignment(leftHandSideExpression.expression, /*canDefinedTempVariablesInPlaces*/ false, /*shouldemitCommaBeforeAssignment*/ false);
|
||||
synthesizedLHS.expression = identifier;
|
||||
|
||||
(<PropertyAccessExpression>synthesizedLHS).dotToken = leftHandSideExpression.dotToken;
|
||||
(<PropertyAccessExpression>synthesizedLHS).name = leftHandSideExpression.name;
|
||||
write(", ");
|
||||
}
|
||||
|
||||
emit(synthesizedLHS || leftHandSideExpression);
|
||||
write(" = ");
|
||||
write("Math.pow(");
|
||||
emit(synthesizedLHS || leftHandSideExpression);
|
||||
write(", ");
|
||||
emit(node.right);
|
||||
write(")");
|
||||
if (shouldEmitParentheses) {
|
||||
write(")");
|
||||
}
|
||||
}
|
||||
else {
|
||||
write("Math.pow(");
|
||||
emit(leftHandSideExpression);
|
||||
write(", ");
|
||||
emit(node.right);
|
||||
write(")");
|
||||
}
|
||||
}
|
||||
|
||||
function emitBinaryExpression(node: BinaryExpression) {
|
||||
if (languageVersion < ScriptTarget.ES6 && node.operatorToken.kind === SyntaxKind.EqualsToken &&
|
||||
(node.left.kind === SyntaxKind.ObjectLiteralExpression || node.left.kind === SyntaxKind.ArrayLiteralExpression)) {
|
||||
@ -2797,12 +2859,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
emitNodeWithoutSourceMap(node.left);
|
||||
write(`", `);
|
||||
}
|
||||
emit(node.left);
|
||||
let indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== SyntaxKind.CommaToken ? " " : undefined);
|
||||
write(tokenToString(node.operatorToken.kind));
|
||||
let indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " ");
|
||||
emit(node.right);
|
||||
decreaseIndentIf(indentedBeforeOperator, indentedAfterOperator);
|
||||
|
||||
if (node.operatorToken.kind === SyntaxKind.AsteriskAsteriskToken || node.operatorToken.kind === SyntaxKind.AsteriskAsteriskEqualsToken) {
|
||||
// Downleveled emit exponentiation operator using Math.pow
|
||||
emitExponentiationOperator(node);
|
||||
}
|
||||
else {
|
||||
emit(node.left);
|
||||
// Add indentation before emit the operator if the operator is on different line
|
||||
// For example:
|
||||
// 3
|
||||
// + 2;
|
||||
// emitted as
|
||||
// 3
|
||||
// + 2;
|
||||
let indentedBeforeOperator = indentIfOnDifferentLines(node, node.left, node.operatorToken, node.operatorToken.kind !== SyntaxKind.CommaToken ? " " : undefined);
|
||||
write(tokenToString(node.operatorToken.kind));
|
||||
let indentedAfterOperator = indentIfOnDifferentLines(node, node.operatorToken, node.right, " ");
|
||||
emit(node.right);
|
||||
decreaseIndentIf(indentedBeforeOperator, indentedAfterOperator);
|
||||
}
|
||||
|
||||
if (exportChanged) {
|
||||
write(")");
|
||||
}
|
||||
@ -3439,6 +3516,58 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
write(";");
|
||||
}
|
||||
|
||||
/**
|
||||
* Emit an assignment to a given identifier, 'name', with a given expression, 'value'.
|
||||
* @param name an identifier as a left-hand-side operand of the assignment
|
||||
* @param value an expression as a right-hand-side operand of the assignment
|
||||
* @param shouldEmitCommaBeforeAssignment a boolean indicating whether to prefix an assignment with comma
|
||||
*/
|
||||
function emitAssignment(name: Identifier, value: Expression, shouldEmitCommaBeforeAssignment: boolean) {
|
||||
if (shouldEmitCommaBeforeAssignment) {
|
||||
write(", ");
|
||||
}
|
||||
|
||||
let exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(name);
|
||||
|
||||
if (exportChanged) {
|
||||
write(`${exportFunctionForFile}("`);
|
||||
emitNodeWithCommentsAndWithoutSourcemap(name);
|
||||
write(`", `);
|
||||
}
|
||||
|
||||
const isVariableDeclarationOrBindingElement =
|
||||
name.parent && (name.parent.kind === SyntaxKind.VariableDeclaration || name.parent.kind === SyntaxKind.BindingElement);
|
||||
|
||||
if (isVariableDeclarationOrBindingElement) {
|
||||
emitModuleMemberName(<Declaration>name.parent);
|
||||
}
|
||||
else {
|
||||
emit(name);
|
||||
}
|
||||
|
||||
write(" = ");
|
||||
emit(value);
|
||||
|
||||
if (exportChanged) {
|
||||
write(")");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create temporary variable, emit an assignment of the variable the given expression
|
||||
* @param expression an expression to assign to the newly created temporary variable
|
||||
* @param canDefineTempVariablesInPlace a boolean indicating whether you can define the temporary variable at an assignment location
|
||||
* @param shouldEmitCommaBeforeAssignment a boolean indicating whether an assignment should prefix with comma
|
||||
*/
|
||||
function emitTempVariableAssignment(expression: Expression, canDefineTempVariablesInPlace: boolean, shouldEmitCommaBeforeAssignment: boolean): Identifier {
|
||||
let identifier = createTempVariable(TempFlags.Auto);
|
||||
if (!canDefineTempVariablesInPlace) {
|
||||
recordTempDeclaration(identifier);
|
||||
}
|
||||
emitAssignment(identifier, expression, shouldEmitCommaBeforeAssignment);
|
||||
return identifier;
|
||||
}
|
||||
|
||||
function emitDestructuring(root: BinaryExpression | VariableDeclaration | ParameterDeclaration, isAssignmentExpressionStatement: boolean, value?: Expression) {
|
||||
let emitCount = 0;
|
||||
|
||||
@ -3464,36 +3593,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
emitBindingElement(<BindingElement>root, value);
|
||||
}
|
||||
|
||||
function emitAssignment(name: Identifier, value: Expression) {
|
||||
if (emitCount++) {
|
||||
write(", ");
|
||||
}
|
||||
|
||||
const isVariableDeclarationOrBindingElement =
|
||||
name.parent && (name.parent.kind === SyntaxKind.VariableDeclaration || name.parent.kind === SyntaxKind.BindingElement);
|
||||
|
||||
let exportChanged = isNameOfExportedSourceLevelDeclarationInSystemExternalModule(name);
|
||||
|
||||
if (exportChanged) {
|
||||
write(`${exportFunctionForFile}("`);
|
||||
emitNodeWithCommentsAndWithoutSourcemap(name);
|
||||
write(`", `);
|
||||
}
|
||||
|
||||
if (isVariableDeclarationOrBindingElement) {
|
||||
emitModuleMemberName(<Declaration>name.parent);
|
||||
}
|
||||
else {
|
||||
emit(name);
|
||||
}
|
||||
|
||||
write(" = ");
|
||||
emit(value);
|
||||
|
||||
if (exportChanged) {
|
||||
write(")");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that there exists a declared identifier whose value holds the given expression.
|
||||
@ -3509,11 +3608,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
return expr;
|
||||
}
|
||||
|
||||
let identifier = createTempVariable(TempFlags.Auto);
|
||||
if (!canDefineTempVariablesInPlace) {
|
||||
recordTempDeclaration(identifier);
|
||||
}
|
||||
emitAssignment(identifier, expr);
|
||||
let identifier = emitTempVariableAssignment(expr, canDefineTempVariablesInPlace, emitCount > 0);
|
||||
emitCount++;
|
||||
return identifier;
|
||||
}
|
||||
|
||||
@ -3620,7 +3716,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
emitArrayLiteralAssignment(<ArrayLiteralExpression>target, value);
|
||||
}
|
||||
else {
|
||||
emitAssignment(<Identifier>target, value);
|
||||
emitAssignment(<Identifier>target, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0);
|
||||
emitCount++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -3689,7 +3786,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, Promi
|
||||
}
|
||||
}
|
||||
else {
|
||||
emitAssignment(<Identifier>target.name, value);
|
||||
emitAssignment(<Identifier>target.name, value, /*shouldEmitCommaBeforeAssignment*/ emitCount > 0);
|
||||
emitCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3035,7 +3035,31 @@ namespace ts {
|
||||
let newPrecedence = getBinaryOperatorPrecedence();
|
||||
|
||||
// Check the precedence to see if we should "take" this operator
|
||||
if (newPrecedence <= precedence) {
|
||||
// - For left associative operator (all operator but **), consume the operator,
|
||||
// recursively call the function below, and parse binaryExpression as a rightOperand
|
||||
// of the caller if the new precendence of the operator is greater then or equal to the current precendence.
|
||||
// For example:
|
||||
// a - b - c;
|
||||
// ^token; leftOperand = b. Return b to the caller as a rightOperand
|
||||
// a * b - c
|
||||
// ^token; leftOperand = b. Return b to the caller as a rightOperand
|
||||
// a - b * c;
|
||||
// ^token; leftOperand = b. Return b * c to the caller as a rightOperand
|
||||
// - For right associative operator (**), consume the operator, recursively call the function
|
||||
// and parse binaryExpression as a rightOperand of the caller if the new precendence of
|
||||
// the operator is strictly grater than the current precendence
|
||||
// For example:
|
||||
// a ** b ** c;
|
||||
// ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand
|
||||
// a - b ** c;
|
||||
// ^^token; leftOperand = b. Return b ** c to the caller as a rightOperand
|
||||
// a ** b - c
|
||||
// ^token; leftOperand = b. Return b to the caller as a rightOperand
|
||||
const consumeCurrentOperator = token === SyntaxKind.AsteriskAsteriskToken ?
|
||||
newPrecedence >= precedence :
|
||||
newPrecedence > precedence;
|
||||
|
||||
if (!consumeCurrentOperator) {
|
||||
break;
|
||||
}
|
||||
|
||||
@ -3109,6 +3133,8 @@ namespace ts {
|
||||
case SyntaxKind.SlashToken:
|
||||
case SyntaxKind.PercentToken:
|
||||
return 10;
|
||||
case SyntaxKind.AsteriskAsteriskToken:
|
||||
return 11;
|
||||
}
|
||||
|
||||
// -1 is lower than all other precedences. Returning it will cause binary expression
|
||||
@ -3135,28 +3161,29 @@ namespace ts {
|
||||
let node = <PrefixUnaryExpression>createNode(SyntaxKind.PrefixUnaryExpression);
|
||||
node.operator = token;
|
||||
nextToken();
|
||||
node.operand = parseUnaryExpressionOrHigher();
|
||||
node.operand = parseSimpleUnaryExpression();
|
||||
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
function parseDeleteExpression() {
|
||||
let node = <DeleteExpression>createNode(SyntaxKind.DeleteExpression);
|
||||
nextToken();
|
||||
node.expression = parseUnaryExpressionOrHigher();
|
||||
node.expression = parseSimpleUnaryExpression();
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
function parseTypeOfExpression() {
|
||||
let node = <TypeOfExpression>createNode(SyntaxKind.TypeOfExpression);
|
||||
nextToken();
|
||||
node.expression = parseUnaryExpressionOrHigher();
|
||||
node.expression = parseSimpleUnaryExpression();
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
function parseVoidExpression() {
|
||||
let node = <VoidExpression>createNode(SyntaxKind.VoidExpression);
|
||||
nextToken();
|
||||
node.expression = parseUnaryExpressionOrHigher();
|
||||
node.expression = parseSimpleUnaryExpression();
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
@ -3176,22 +3203,63 @@ namespace ts {
|
||||
function parseAwaitExpression() {
|
||||
const node = <AwaitExpression>createNode(SyntaxKind.AwaitExpression);
|
||||
nextToken();
|
||||
node.expression = parseUnaryExpressionOrHigher();
|
||||
node.expression = parseSimpleUnaryExpression();
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
function parseUnaryExpressionOrHigher(): UnaryExpression {
|
||||
/**
|
||||
* Parse ES7 unary expression and await expression
|
||||
*
|
||||
* ES7 UnaryExpression:
|
||||
* 1) SimpleUnaryExpression[?yield]
|
||||
* 2) IncrementExpression[?yield] ** UnaryExpression[?yield]
|
||||
*/
|
||||
function parseUnaryExpressionOrHigher(): UnaryExpression | BinaryExpression {
|
||||
if (isAwaitExpression()) {
|
||||
return parseAwaitExpression();
|
||||
}
|
||||
|
||||
if (isIncrementExpression()) {
|
||||
let incrementExpression = parseIncrementExpression();
|
||||
return token === SyntaxKind.AsteriskAsteriskToken ?
|
||||
<BinaryExpression>parseBinaryExpressionRest(getBinaryOperatorPrecedence(), incrementExpression) :
|
||||
incrementExpression;
|
||||
}
|
||||
|
||||
let unaryOperator = token;
|
||||
let simpleUnaryExpression = parseSimpleUnaryExpression();
|
||||
if (token === SyntaxKind.AsteriskAsteriskToken) {
|
||||
let diagnostic: Diagnostic;
|
||||
let start = skipTrivia(sourceText, simpleUnaryExpression.pos);
|
||||
if (simpleUnaryExpression.kind === SyntaxKind.TypeAssertionExpression) {
|
||||
parseErrorAtPosition(start, simpleUnaryExpression.end - start, Diagnostics.A_type_assertion_expression_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses);
|
||||
}
|
||||
else {
|
||||
parseErrorAtPosition(start, simpleUnaryExpression.end - start, Diagnostics.An_unary_expression_with_the_0_operator_is_not_allowed_in_the_left_hand_side_of_an_exponentiation_expression_Consider_enclosing_the_expression_in_parentheses, tokenToString(unaryOperator));
|
||||
}
|
||||
}
|
||||
return simpleUnaryExpression;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse ES7 simple-unary expression or higher:
|
||||
*
|
||||
* ES7 SimpleUnaryExpression:
|
||||
* 1) IncrementExpression[?yield]
|
||||
* 2) delete UnaryExpression[?yield]
|
||||
* 3) void UnaryExpression[?yield]
|
||||
* 4) typeof UnaryExpression[?yield]
|
||||
* 5) + UnaryExpression[?yield]
|
||||
* 6) - UnaryExpression[?yield]
|
||||
* 7) ~ UnaryExpression[?yield]
|
||||
* 8) ! UnaryExpression[?yield]
|
||||
*/
|
||||
function parseSimpleUnaryExpression(): UnaryExpression {
|
||||
switch (token) {
|
||||
case SyntaxKind.PlusToken:
|
||||
case SyntaxKind.MinusToken:
|
||||
case SyntaxKind.TildeToken:
|
||||
case SyntaxKind.ExclamationToken:
|
||||
case SyntaxKind.PlusPlusToken:
|
||||
case SyntaxKind.MinusMinusToken:
|
||||
return parsePrefixUnaryExpression();
|
||||
case SyntaxKind.DeleteKeyword:
|
||||
return parseDeleteExpression();
|
||||
@ -3200,19 +3268,73 @@ namespace ts {
|
||||
case SyntaxKind.VoidKeyword:
|
||||
return parseVoidExpression();
|
||||
case SyntaxKind.LessThanToken:
|
||||
if (sourceFile.languageVariant !== LanguageVariant.JSX) {
|
||||
return parseTypeAssertion();
|
||||
}
|
||||
if (lookAhead(nextTokenIsIdentifierOrKeyword)) {
|
||||
return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true);
|
||||
}
|
||||
// Fall through
|
||||
// This is modified UnaryExpression grammar in TypeScript
|
||||
// UnaryExpression (modified):
|
||||
// < type > UnaryExpression
|
||||
return parseTypeAssertion();
|
||||
default:
|
||||
return parsePostfixExpressionOrHigher();
|
||||
return parseIncrementExpression();
|
||||
}
|
||||
}
|
||||
|
||||
function parsePostfixExpressionOrHigher(): PostfixExpression {
|
||||
/**
|
||||
* Check if the current token can possibly be an ES7 increment expression.
|
||||
*
|
||||
* ES7 IncrementExpression:
|
||||
* LeftHandSideExpression[?Yield]
|
||||
* LeftHandSideExpression[?Yield][no LineTerminator here]++
|
||||
* LeftHandSideExpression[?Yield][no LineTerminator here]--
|
||||
* ++LeftHandSideExpression[?Yield]
|
||||
* --LeftHandSideExpression[?Yield]
|
||||
*/
|
||||
function isIncrementExpression(): boolean {
|
||||
// This function is called inside parseUnaryExpression to decide
|
||||
// whether to call parseSimpleUnaryExpression or call parseIncrmentExpression directly
|
||||
switch (token) {
|
||||
case SyntaxKind.PlusToken:
|
||||
case SyntaxKind.MinusToken:
|
||||
case SyntaxKind.TildeToken:
|
||||
case SyntaxKind.ExclamationToken:
|
||||
case SyntaxKind.DeleteKeyword:
|
||||
case SyntaxKind.TypeOfKeyword:
|
||||
case SyntaxKind.VoidKeyword:
|
||||
return false;
|
||||
case SyntaxKind.LessThanToken:
|
||||
// If we are not in JSX context, we are parsing TypeAssertion which is an UnaryExpression
|
||||
if (sourceFile.languageVariant !== LanguageVariant.JSX) {
|
||||
return false;
|
||||
}
|
||||
// We are in JSX context and the token is part of JSXElement.
|
||||
// Fall through
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse ES7 IncrementExpression. IncrementExpression is used instead of ES6's PostFixExpression.
|
||||
*
|
||||
* ES7 IncrementExpression[yield]:
|
||||
* 1) LeftHandSideExpression[?yield]
|
||||
* 2) LeftHandSideExpression[?yield] [[no LineTerminator here]]++
|
||||
* 3) LeftHandSideExpression[?yield] [[no LineTerminator here]]--
|
||||
* 4) ++LeftHandSideExpression[?yield]
|
||||
* 5) --LeftHandSideExpression[?yield]
|
||||
* In TypeScript (2), (3) are parsed as PostfixUnaryExpression. (4), (5) are parsed as PrefixUnaryExpression
|
||||
*/
|
||||
function parseIncrementExpression(): IncrementExpression {
|
||||
if (token === SyntaxKind.PlusPlusToken || token === SyntaxKind.MinusMinusToken) {
|
||||
let node = <PrefixUnaryExpression>createNode(SyntaxKind.PrefixUnaryExpression);
|
||||
node.operator = token;
|
||||
nextToken();
|
||||
node.operand = parseLeftHandSideExpressionOrHigher();
|
||||
return finishNode(node);
|
||||
}
|
||||
else if (sourceFile.languageVariant === LanguageVariant.JSX && token === SyntaxKind.LessThanToken && lookAhead(nextTokenIsIdentifierOrKeyword)) {
|
||||
// JSXElement is part of primaryExpression
|
||||
return parseJsxElementOrSelfClosingElement(/*inExpressionContext*/ true);
|
||||
}
|
||||
|
||||
let expression = parseLeftHandSideExpressionOrHigher();
|
||||
|
||||
Debug.assert(isLeftHandSideExpression(expression));
|
||||
@ -3509,7 +3631,7 @@ namespace ts {
|
||||
parseExpected(SyntaxKind.LessThanToken);
|
||||
node.type = parseType();
|
||||
parseExpected(SyntaxKind.GreaterThanToken);
|
||||
node.expression = parseUnaryExpressionOrHigher();
|
||||
node.expression = parseSimpleUnaryExpression();
|
||||
return finishNode(node);
|
||||
}
|
||||
|
||||
|
||||
@ -65,7 +65,7 @@ namespace ts {
|
||||
: { resolvedModule: undefined, failedLookupLocations };
|
||||
}
|
||||
else {
|
||||
return loadModuleFromNodeModules(moduleName, containingDirectory, host);
|
||||
return loadModuleFromNodeModules(moduleName, containingDirectory, supportedExtensions, host);
|
||||
}
|
||||
}
|
||||
|
||||
@ -114,7 +114,7 @@ namespace ts {
|
||||
return loadNodeModuleFromFile(combinePaths(candidate, "index"), supportedExtensions, failedLookupLocation, host);
|
||||
}
|
||||
|
||||
function loadModuleFromNodeModules(moduleName: string, directory: string, host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations {
|
||||
function loadModuleFromNodeModules(moduleName: string, directory: string, supportedExtensions: string[], host: ModuleResolutionHost): ResolvedModuleWithFailedLookupLocations {
|
||||
let failedLookupLocations: string[] = [];
|
||||
directory = normalizeSlashes(directory);
|
||||
while (true) {
|
||||
@ -122,12 +122,12 @@ namespace ts {
|
||||
if (baseName !== "node_modules") {
|
||||
let nodeModulesFolder = combinePaths(directory, "node_modules");
|
||||
let candidate = normalizePath(combinePaths(nodeModulesFolder, moduleName));
|
||||
let result = loadNodeModuleFromFile(candidate, /* loadOnlyDts */ ["d.ts"], failedLookupLocations, host);
|
||||
let result = loadNodeModuleFromFile(candidate, supportedExtensions, failedLookupLocations, host);
|
||||
if (result) {
|
||||
return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations };
|
||||
}
|
||||
|
||||
result = loadNodeModuleFromDirectory(candidate, /* loadOnlyDts */ ["d.ts"], failedLookupLocations, host);
|
||||
result = loadNodeModuleFromDirectory(candidate, supportedExtensions, failedLookupLocations, host);
|
||||
if (result) {
|
||||
return { resolvedModule: { resolvedFileName: result, isExternalLibraryImport: true }, failedLookupLocations };
|
||||
}
|
||||
@ -1244,11 +1244,6 @@ namespace ts {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "emitDecoratorMetadata", "experimentalDecorators"));
|
||||
}
|
||||
|
||||
if (options.experimentalAsyncFunctions &&
|
||||
options.target !== ScriptTarget.ES6) {
|
||||
programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_experimentalAsyncFunctions_cannot_be_specified_when_targeting_ES5_or_lower));
|
||||
}
|
||||
|
||||
if (!options.noEmit) {
|
||||
let emitHost = getEmitHost();
|
||||
let emitFilesSeen: Map<SourceFile[]> = {};
|
||||
|
||||
@ -136,6 +136,7 @@ namespace ts {
|
||||
"=>": SyntaxKind.EqualsGreaterThanToken,
|
||||
"+": SyntaxKind.PlusToken,
|
||||
"-": SyntaxKind.MinusToken,
|
||||
"**": SyntaxKind.AsteriskAsteriskToken,
|
||||
"*": SyntaxKind.AsteriskToken,
|
||||
"/": SyntaxKind.SlashToken,
|
||||
"%": SyntaxKind.PercentToken,
|
||||
@ -158,6 +159,7 @@ namespace ts {
|
||||
"+=": SyntaxKind.PlusEqualsToken,
|
||||
"-=": SyntaxKind.MinusEqualsToken,
|
||||
"*=": SyntaxKind.AsteriskEqualsToken,
|
||||
"**=": SyntaxKind.AsteriskAsteriskEqualsToken,
|
||||
"/=": SyntaxKind.SlashEqualsToken,
|
||||
"%=": SyntaxKind.PercentEqualsToken,
|
||||
"<<=": SyntaxKind.LessThanLessThanEqualsToken,
|
||||
@ -1200,6 +1202,12 @@ namespace ts {
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.equals) {
|
||||
return pos += 2, token = SyntaxKind.AsteriskEqualsToken;
|
||||
}
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.asterisk) {
|
||||
if (text.charCodeAt(pos + 2) === CharacterCodes.equals) {
|
||||
return pos += 3, token = SyntaxKind.AsteriskAsteriskEqualsToken;
|
||||
}
|
||||
return pos += 2, token = SyntaxKind.AsteriskAsteriskToken;
|
||||
}
|
||||
return pos++, token = SyntaxKind.AsteriskToken;
|
||||
case CharacterCodes.plus:
|
||||
if (text.charCodeAt(pos + 1) === CharacterCodes.plus) {
|
||||
|
||||
@ -8,7 +8,8 @@ namespace ts {
|
||||
write(s: string): void;
|
||||
readFile(path: string, encoding?: string): string;
|
||||
writeFile(path: string, data: string, writeByteOrderMark?: boolean): void;
|
||||
watchFile?(path: string, callback: (path: string, removed: boolean) => void): FileWatcher;
|
||||
watchFile?(path: string, callback: (path: string, removed?: boolean) => void): FileWatcher;
|
||||
watchDirectory?(path: string, callback: (path: string) => void, recursive?: boolean): FileWatcher;
|
||||
resolvePath(path: string): string;
|
||||
fileExists(path: string): boolean;
|
||||
directoryExists(path: string): boolean;
|
||||
@ -20,6 +21,12 @@ namespace ts {
|
||||
exit(exitCode?: number): void;
|
||||
}
|
||||
|
||||
interface WatchedFile {
|
||||
fileName: string;
|
||||
callback: (fileName: string, removed?: boolean) => void;
|
||||
mtime: Date;
|
||||
}
|
||||
|
||||
export interface FileWatcher {
|
||||
close(): void;
|
||||
}
|
||||
@ -192,6 +199,103 @@ namespace ts {
|
||||
const _path = require("path");
|
||||
const _os = require("os");
|
||||
|
||||
// average async stat takes about 30 microseconds
|
||||
// set chunk size to do 30 files in < 1 millisecond
|
||||
function createWatchedFileSet(interval = 2500, chunkSize = 30) {
|
||||
let watchedFiles: WatchedFile[] = [];
|
||||
let nextFileToCheck = 0;
|
||||
let watchTimer: any;
|
||||
|
||||
function getModifiedTime(fileName: string): Date {
|
||||
return _fs.statSync(fileName).mtime;
|
||||
}
|
||||
|
||||
function poll(checkedIndex: number) {
|
||||
let watchedFile = watchedFiles[checkedIndex];
|
||||
if (!watchedFile) {
|
||||
return;
|
||||
}
|
||||
|
||||
_fs.stat(watchedFile.fileName, (err: any, stats: any) => {
|
||||
if (err) {
|
||||
watchedFile.callback(watchedFile.fileName);
|
||||
}
|
||||
else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) {
|
||||
watchedFile.mtime = getModifiedTime(watchedFile.fileName);
|
||||
watchedFile.callback(watchedFile.fileName, watchedFile.mtime.getTime() === 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// this implementation uses polling and
|
||||
// stat due to inconsistencies of fs.watch
|
||||
// and efficiency of stat on modern filesystems
|
||||
function startWatchTimer() {
|
||||
watchTimer = setInterval(() => {
|
||||
let count = 0;
|
||||
let nextToCheck = nextFileToCheck;
|
||||
let firstCheck = -1;
|
||||
while ((count < chunkSize) && (nextToCheck !== firstCheck)) {
|
||||
poll(nextToCheck);
|
||||
if (firstCheck < 0) {
|
||||
firstCheck = nextToCheck;
|
||||
}
|
||||
nextToCheck++;
|
||||
if (nextToCheck === watchedFiles.length) {
|
||||
nextToCheck = 0;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
nextFileToCheck = nextToCheck;
|
||||
}, interval);
|
||||
}
|
||||
|
||||
function addFile(fileName: string, callback: (fileName: string, removed?: boolean) => void): WatchedFile {
|
||||
let file: WatchedFile = {
|
||||
fileName,
|
||||
callback,
|
||||
mtime: getModifiedTime(fileName)
|
||||
};
|
||||
|
||||
watchedFiles.push(file);
|
||||
if (watchedFiles.length === 1) {
|
||||
startWatchTimer();
|
||||
}
|
||||
return file;
|
||||
}
|
||||
|
||||
function removeFile(file: WatchedFile) {
|
||||
watchedFiles = copyListRemovingItem(file, watchedFiles);
|
||||
}
|
||||
|
||||
return {
|
||||
getModifiedTime: getModifiedTime,
|
||||
poll: poll,
|
||||
startWatchTimer: startWatchTimer,
|
||||
addFile: addFile,
|
||||
removeFile: removeFile
|
||||
};
|
||||
}
|
||||
|
||||
// REVIEW: for now this implementation uses polling.
|
||||
// The advantage of polling is that it works reliably
|
||||
// on all os and with network mounted files.
|
||||
// For 90 referenced files, the average time to detect
|
||||
// changes is 2*msInterval (by default 5 seconds).
|
||||
// The overhead of this is .04 percent (1/2500) with
|
||||
// average pause of < 1 millisecond (and max
|
||||
// pause less than 1.5 milliseconds); question is
|
||||
// do we anticipate reference sets in the 100s and
|
||||
// do we care about waiting 10-20 seconds to detect
|
||||
// changes for large reference sets? If so, do we want
|
||||
// to increase the chunk size or decrease the interval
|
||||
// time dynamically to match the large reference set?
|
||||
let watchedFileSet = createWatchedFileSet();
|
||||
|
||||
function isNode4OrLater(): Boolean {
|
||||
return parseInt(process.version.charAt(1)) >= 4;
|
||||
}
|
||||
|
||||
const platform: string = _os.platform();
|
||||
// win32\win64 are case insensitive platforms, MacOS (darwin) by default is also case insensitive
|
||||
const useCaseSensitiveFileNames = platform !== "win32" && platform !== "win64" && platform !== "darwin";
|
||||
@ -284,25 +388,36 @@ namespace ts {
|
||||
readFile,
|
||||
writeFile,
|
||||
watchFile: (fileName, callback) => {
|
||||
// watchFile polls a file every 250ms, picking up file notifications.
|
||||
_fs.watchFile(fileName, { persistent: true, interval: 250 }, fileChanged);
|
||||
|
||||
return {
|
||||
close() { _fs.unwatchFile(fileName, fileChanged); }
|
||||
};
|
||||
|
||||
function fileChanged(curr: any, prev: any) {
|
||||
// mtime.getTime() equals 0 if file was removed
|
||||
if (curr.mtime.getTime() === 0) {
|
||||
callback(fileName, /* removed */ true);
|
||||
return;
|
||||
}
|
||||
if (+curr.mtime <= +prev.mtime) {
|
||||
return;
|
||||
}
|
||||
|
||||
callback(fileName, /* removed */ false);
|
||||
// Node 4.0 stablized the `fs.watch` function on Windows which avoids polling
|
||||
// and is more efficient than `fs.watchFile` (ref: https://github.com/nodejs/node/pull/2649
|
||||
// and https://github.com/Microsoft/TypeScript/issues/4643), therefore
|
||||
// if the current node.js version is newer than 4, use `fs.watch` instead.
|
||||
if (isNode4OrLater()) {
|
||||
// Note: in node the callback of fs.watch is given only the relative file name as a parameter
|
||||
return _fs.watch(fileName, (eventName: string, relativeFileName: string) => callback(fileName));
|
||||
}
|
||||
|
||||
let watchedFile = watchedFileSet.addFile(fileName, callback);
|
||||
return {
|
||||
close: () => watchedFileSet.removeFile(watchedFile)
|
||||
};
|
||||
},
|
||||
watchDirectory: (path, callback, recursive) => {
|
||||
// Node 4.0 `fs.watch` function supports the "recursive" option on both OSX and Windows
|
||||
// (ref: https://github.com/nodejs/node/pull/2649 and https://github.com/Microsoft/TypeScript/issues/4643)
|
||||
return _fs.watch(
|
||||
path,
|
||||
{ persisten: true, recursive: !!recursive },
|
||||
(eventName: string, relativeFileName: string) => {
|
||||
// In watchDirectory we only care about adding and removing files (when event name is
|
||||
// "rename"); changes made within files are handled by corresponding fileWatchers (when
|
||||
// event name is "change")
|
||||
if (eventName === "rename") {
|
||||
// When deleting a file, the passed baseFileName is null
|
||||
callback(!relativeFileName ? relativeFileName : normalizePath(ts.combinePaths(path, relativeFileName)));
|
||||
};
|
||||
}
|
||||
);
|
||||
},
|
||||
resolvePath: function (path: string): string {
|
||||
return _path.resolve(path);
|
||||
|
||||
@ -147,14 +147,17 @@ namespace ts {
|
||||
|
||||
export function executeCommandLine(args: string[]): void {
|
||||
let commandLine = parseCommandLine(args);
|
||||
let configFileName: string; // Configuration file name (if any)
|
||||
let configFileWatcher: FileWatcher; // Configuration file watcher
|
||||
let cachedProgram: Program; // Program cached from last compilation
|
||||
let rootFileNames: string[]; // Root fileNames for compilation
|
||||
let compilerOptions: CompilerOptions; // Compiler options for compilation
|
||||
let compilerHost: CompilerHost; // Compiler host
|
||||
let hostGetSourceFile: typeof compilerHost.getSourceFile; // getSourceFile method from default host
|
||||
let timerHandle: number; // Handle for 0.25s wait timer
|
||||
let configFileName: string; // Configuration file name (if any)
|
||||
let cachedConfigFileText: string; // Cached configuration file text, used for reparsing (if any)
|
||||
let configFileWatcher: FileWatcher; // Configuration file watcher
|
||||
let directoryWatcher: FileWatcher; // Directory watcher to monitor source file addition/removal
|
||||
let cachedProgram: Program; // Program cached from last compilation
|
||||
let rootFileNames: string[]; // Root fileNames for compilation
|
||||
let compilerOptions: CompilerOptions; // Compiler options for compilation
|
||||
let compilerHost: CompilerHost; // Compiler host
|
||||
let hostGetSourceFile: typeof compilerHost.getSourceFile; // getSourceFile method from default host
|
||||
let timerHandleForRecompilation: number; // Handle for 0.25s wait timer to trigger recompilation
|
||||
let timerHandleForDirectoryChanges: number; // Handle for 0.25s wait timer to trigger directory change handler
|
||||
|
||||
if (commandLine.options.locale) {
|
||||
if (!isJSONSupported()) {
|
||||
@ -218,28 +221,49 @@ namespace ts {
|
||||
if (configFileName) {
|
||||
configFileWatcher = sys.watchFile(configFileName, configFileChanged);
|
||||
}
|
||||
if (sys.watchDirectory && configFileName) {
|
||||
let directory = ts.getDirectoryPath(configFileName);
|
||||
directoryWatcher = sys.watchDirectory(
|
||||
// When the configFileName is just "tsconfig.json", the watched directory should be
|
||||
// the current direcotry; if there is a given "project" parameter, then the configFileName
|
||||
// is an absolute file name.
|
||||
directory == "" ? "." : directory,
|
||||
watchedDirectoryChanged, /*recursive*/ true);
|
||||
}
|
||||
}
|
||||
|
||||
performCompilation();
|
||||
|
||||
function parseConfigFile(): ParsedCommandLine {
|
||||
if (!cachedConfigFileText) {
|
||||
try {
|
||||
cachedConfigFileText = sys.readFile(configFileName);
|
||||
}
|
||||
catch (e) {
|
||||
let error = createCompilerDiagnostic(Diagnostics.Cannot_read_file_0_Colon_1, configFileName, e.message);
|
||||
reportWatchDiagnostic(error);
|
||||
sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
let result = parseConfigFileTextToJson(configFileName, cachedConfigFileText);
|
||||
let configObject = result.config;
|
||||
let configParseResult = parseJsonConfigFileContent(configObject, sys, getDirectoryPath(configFileName), commandLine.options);
|
||||
if (configParseResult.errors.length > 0) {
|
||||
reportDiagnostics(configParseResult.errors);
|
||||
sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped);
|
||||
return;
|
||||
}
|
||||
return configParseResult;
|
||||
}
|
||||
|
||||
// Invoked to perform initial compilation or re-compilation in watch mode
|
||||
function performCompilation() {
|
||||
|
||||
if (!cachedProgram) {
|
||||
if (configFileName) {
|
||||
|
||||
let result = readConfigFile(configFileName, sys.readFile);
|
||||
if (result.error) {
|
||||
reportWatchDiagnostic(result.error);
|
||||
return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped);
|
||||
}
|
||||
|
||||
let configObject = result.config;
|
||||
let configParseResult = parseConfigFile(configObject, sys, getDirectoryPath(configFileName), commandLine.options);
|
||||
if (configParseResult.errors.length > 0) {
|
||||
reportDiagnostics(configParseResult.errors);
|
||||
return sys.exit(ExitStatus.DiagnosticsPresent_OutputsSkipped);
|
||||
}
|
||||
let configParseResult = parseConfigFile();
|
||||
rootFileNames = configParseResult.fileNames;
|
||||
compilerOptions = configParseResult.options;
|
||||
}
|
||||
@ -275,7 +299,7 @@ namespace ts {
|
||||
let sourceFile = hostGetSourceFile(fileName, languageVersion, onError);
|
||||
if (sourceFile && compilerOptions.watch) {
|
||||
// Attach a file watcher
|
||||
sourceFile.fileWatcher = sys.watchFile(sourceFile.fileName, (fileName, removed) => sourceFileChanged(sourceFile, removed));
|
||||
sourceFile.fileWatcher = sys.watchFile(sourceFile.fileName, (fileName: string, removed?: boolean) => sourceFileChanged(sourceFile, removed));
|
||||
}
|
||||
return sourceFile;
|
||||
}
|
||||
@ -297,7 +321,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
// If a source file changes, mark it as unwatched and start the recompilation timer
|
||||
function sourceFileChanged(sourceFile: SourceFile, removed: boolean) {
|
||||
function sourceFileChanged(sourceFile: SourceFile, removed?: boolean) {
|
||||
sourceFile.fileWatcher.close();
|
||||
sourceFile.fileWatcher = undefined;
|
||||
if (removed) {
|
||||
@ -306,27 +330,54 @@ namespace ts {
|
||||
rootFileNames.splice(index, 1);
|
||||
}
|
||||
}
|
||||
startTimer();
|
||||
startTimerForRecompilation();
|
||||
}
|
||||
|
||||
// If the configuration file changes, forget cached program and start the recompilation timer
|
||||
function configFileChanged() {
|
||||
setCachedProgram(undefined);
|
||||
startTimer();
|
||||
cachedConfigFileText = undefined;
|
||||
startTimerForRecompilation();
|
||||
}
|
||||
|
||||
function watchedDirectoryChanged(fileName: string) {
|
||||
if (fileName && !ts.isSupportedSourceFileName(fileName, commandLine.options)) {
|
||||
return;
|
||||
}
|
||||
|
||||
startTimerForHandlingDirectoryChanges();
|
||||
}
|
||||
|
||||
function startTimerForHandlingDirectoryChanges() {
|
||||
if (timerHandleForDirectoryChanges) {
|
||||
clearTimeout(timerHandleForDirectoryChanges);
|
||||
}
|
||||
timerHandleForDirectoryChanges = setTimeout(directoryChangeHandler, 250);
|
||||
}
|
||||
|
||||
function directoryChangeHandler() {
|
||||
let parsedCommandLine = parseConfigFile();
|
||||
let newFileNames = ts.map(parsedCommandLine.fileNames, compilerHost.getCanonicalFileName);
|
||||
let canonicalRootFileNames = ts.map(rootFileNames, compilerHost.getCanonicalFileName);
|
||||
|
||||
if (!arrayStructurallyIsEqualTo(newFileNames, canonicalRootFileNames)) {
|
||||
setCachedProgram(undefined);
|
||||
startTimerForRecompilation();
|
||||
}
|
||||
}
|
||||
|
||||
// Upon detecting a file change, wait for 250ms and then perform a recompilation. This gives batch
|
||||
// operations (such as saving all modified files in an editor) a chance to complete before we kick
|
||||
// off a new compilation.
|
||||
function startTimer() {
|
||||
if (timerHandle) {
|
||||
clearTimeout(timerHandle);
|
||||
function startTimerForRecompilation() {
|
||||
if (timerHandleForRecompilation) {
|
||||
clearTimeout(timerHandleForRecompilation);
|
||||
}
|
||||
timerHandle = setTimeout(recompile, 250);
|
||||
timerHandleForRecompilation = setTimeout(recompile, 250);
|
||||
}
|
||||
|
||||
function recompile() {
|
||||
timerHandle = undefined;
|
||||
timerHandleForRecompilation = undefined;
|
||||
reportWatchDiagnostic(createCompilerDiagnostic(Diagnostics.File_change_detected_Starting_incremental_compilation));
|
||||
performCompilation();
|
||||
}
|
||||
|
||||
@ -64,6 +64,7 @@ namespace ts {
|
||||
PlusToken,
|
||||
MinusToken,
|
||||
AsteriskToken,
|
||||
AsteriskAsteriskToken,
|
||||
SlashToken,
|
||||
PercentToken,
|
||||
PlusPlusToken,
|
||||
@ -86,6 +87,7 @@ namespace ts {
|
||||
PlusEqualsToken,
|
||||
MinusEqualsToken,
|
||||
AsteriskEqualsToken,
|
||||
AsteriskAsteriskEqualsToken,
|
||||
SlashEqualsToken,
|
||||
PercentEqualsToken,
|
||||
LessThanLessThanEqualsToken,
|
||||
@ -711,12 +713,16 @@ namespace ts {
|
||||
_unaryExpressionBrand: any;
|
||||
}
|
||||
|
||||
export interface PrefixUnaryExpression extends UnaryExpression {
|
||||
export interface IncrementExpression extends UnaryExpression {
|
||||
_incrementExpressionBrand: any;
|
||||
}
|
||||
|
||||
export interface PrefixUnaryExpression extends IncrementExpression {
|
||||
operator: SyntaxKind;
|
||||
operand: UnaryExpression;
|
||||
}
|
||||
|
||||
export interface PostfixUnaryExpression extends PostfixExpression {
|
||||
export interface PostfixUnaryExpression extends IncrementExpression {
|
||||
operand: LeftHandSideExpression;
|
||||
operator: SyntaxKind;
|
||||
}
|
||||
@ -725,7 +731,7 @@ namespace ts {
|
||||
_postfixExpressionBrand: any;
|
||||
}
|
||||
|
||||
export interface LeftHandSideExpression extends PostfixExpression {
|
||||
export interface LeftHandSideExpression extends IncrementExpression {
|
||||
_leftHandSideExpressionBrand: any;
|
||||
}
|
||||
|
||||
@ -2080,7 +2086,6 @@ namespace ts {
|
||||
watch?: boolean;
|
||||
isolatedModules?: boolean;
|
||||
experimentalDecorators?: boolean;
|
||||
experimentalAsyncFunctions?: boolean;
|
||||
emitDecoratorMetadata?: boolean;
|
||||
moduleResolution?: ModuleResolutionKind;
|
||||
jsExtensions?: string[];
|
||||
|
||||
@ -898,6 +898,14 @@ namespace ts {
|
||||
return nodeIsDecorated(node) || childIsDecorated(node);
|
||||
}
|
||||
|
||||
export function isPropertyAccessExpression(node: Node): node is PropertyAccessExpression {
|
||||
return node.kind === SyntaxKind.PropertyAccessExpression;
|
||||
}
|
||||
|
||||
export function isElementAccessExpression(node: Node): node is ElementAccessExpression {
|
||||
return node.kind === SyntaxKind.ElementAccessExpression;
|
||||
}
|
||||
|
||||
export function isExpression(node: Node): boolean {
|
||||
switch (node.kind) {
|
||||
case SyntaxKind.SuperKeyword:
|
||||
@ -1416,7 +1424,7 @@ namespace ts {
|
||||
* where Symbol is literally the word "Symbol", and name is any identifierName
|
||||
*/
|
||||
export function isWellKnownSymbolSyntactically(node: Expression): boolean {
|
||||
return node.kind === SyntaxKind.PropertyAccessExpression && isESSymbolIdentifier((<PropertyAccessExpression>node).expression);
|
||||
return isPropertyAccessExpression(node) && isESSymbolIdentifier(node.expression);
|
||||
}
|
||||
|
||||
export function getPropertyNameForPropertyNameNode(name: DeclarationName): string {
|
||||
@ -1847,8 +1855,8 @@ namespace ts {
|
||||
return false;
|
||||
}
|
||||
|
||||
export function getSupportedExtensions(options: CompilerOptions): string[] {
|
||||
return options.jsExtensions ? supportedTypeScriptExtensions.concat(options.jsExtensions) : supportedTypeScriptExtensions;
|
||||
export function getSupportedExtensions(options?: CompilerOptions): string[] {
|
||||
return options && options.jsExtensions ? supportedTypeScriptExtensions.concat(options.jsExtensions) : supportedTypeScriptExtensions;
|
||||
}
|
||||
|
||||
export function getAllAccessorDeclarations(declarations: NodeArray<Declaration>, accessor: AccessorDeclaration) {
|
||||
@ -2097,8 +2105,8 @@ namespace ts {
|
||||
if (node.kind === SyntaxKind.Identifier) {
|
||||
return true;
|
||||
}
|
||||
else if (node.kind === SyntaxKind.PropertyAccessExpression) {
|
||||
return isSupportedExpressionWithTypeArgumentsRest((<PropertyAccessExpression>node).expression);
|
||||
else if (isPropertyAccessExpression(node)) {
|
||||
return isSupportedExpressionWithTypeArgumentsRest(node.expression);
|
||||
}
|
||||
else {
|
||||
return false;
|
||||
@ -2461,4 +2469,16 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export function arrayStructurallyIsEqualTo<T>(array1: Array<T>, array2: Array<T>): boolean {
|
||||
if (!array1 || !array2) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (array1.length !== array2.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return arrayIsEqualTo(array1.sort(), array2.sort());
|
||||
}
|
||||
}
|
||||
|
||||
@ -601,14 +601,21 @@ namespace FourSlash {
|
||||
}
|
||||
}
|
||||
|
||||
public verifyCompletionListItemsCountIsGreaterThan(count: number) {
|
||||
public verifyCompletionListItemsCountIsGreaterThan(count: number, negative: boolean) {
|
||||
this.taoInvalidReason = "verifyCompletionListItemsCountIsGreaterThan NYI";
|
||||
|
||||
let completions = this.getCompletionListAtCaret();
|
||||
let itemsCount = completions.entries.length;
|
||||
|
||||
if (itemsCount <= count) {
|
||||
this.raiseError(`Expected completion list items count to be greater than ${count}, but is actually ${itemsCount}`);
|
||||
if (negative) {
|
||||
if (itemsCount > count) {
|
||||
this.raiseError(`Expected completion list items count to not be greater than ${count}, but is actually ${itemsCount}`);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (itemsCount <= count) {
|
||||
this.raiseError(`Expected completion list items count to be greater than ${count}, but is actually ${itemsCount}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -572,6 +572,10 @@ namespace Harness.LanguageService {
|
||||
return { close() { } };
|
||||
}
|
||||
|
||||
watchDirectory(path: string, callback: (path: string) => void, recursive?: boolean): ts.FileWatcher {
|
||||
return { close() { } };
|
||||
}
|
||||
|
||||
close(): void {
|
||||
}
|
||||
|
||||
@ -614,7 +618,9 @@ namespace Harness.LanguageService {
|
||||
// This host is just a proxy for the clientHost, it uses the client
|
||||
// host to answer server queries about files on disk
|
||||
let serverHost = new SessionServerHost(clientHost);
|
||||
let server = new ts.server.Session(serverHost, Buffer.byteLength, process.hrtime, serverHost);
|
||||
let server = new ts.server.Session(serverHost,
|
||||
Buffer ? Buffer.byteLength : (string: string, encoding?: string) => string.length,
|
||||
process.hrtime, serverHost);
|
||||
|
||||
// Fake the connection between the client and the server
|
||||
serverHost.writeMessage = client.onMessage.bind(client);
|
||||
|
||||
@ -211,7 +211,7 @@ class ProjectRunner extends RunnerBase {
|
||||
}
|
||||
|
||||
let configObject = result.config;
|
||||
let configParseResult = ts.parseConfigFile(configObject, { fileExists, readFile: getSourceFileText, readDirectory }, ts.getDirectoryPath(configFileName), compilerOptions);
|
||||
let configParseResult = ts.parseJsonConfigFileContent(configObject, { fileExists, readFile: getSourceFileText, readDirectory }, ts.getDirectoryPath(configFileName), compilerOptions);
|
||||
if (configParseResult.errors.length > 0) {
|
||||
return {
|
||||
moduleKind,
|
||||
|
||||
@ -78,8 +78,8 @@ namespace RWC {
|
||||
let tsconfigFile = ts.forEach(ioLog.filesRead, f => isTsConfigFile(f) ? f : undefined);
|
||||
if (tsconfigFile) {
|
||||
let tsconfigFileContents = getHarnessCompilerInputUnit(tsconfigFile.path);
|
||||
let parsedTsconfigFileContents = ts.parseConfigFileText(tsconfigFile.path, tsconfigFileContents.content);
|
||||
let configParseResult = ts.parseConfigFile(parsedTsconfigFileContents.config, Harness.IO, ts.getDirectoryPath(tsconfigFile.path));
|
||||
let parsedTsconfigFileContents = ts.parseConfigFileTextToJson(tsconfigFile.path, tsconfigFileContents.content);
|
||||
let configParseResult = ts.parseJsonConfigFileContent(parsedTsconfigFileContents.config, Harness.IO, ts.getDirectoryPath(tsconfigFile.path));
|
||||
fileNames = configParseResult.fileNames;
|
||||
opts.options = ts.extend(opts.options, configParseResult.options);
|
||||
}
|
||||
|
||||
@ -78,19 +78,19 @@ namespace ts.server {
|
||||
return this.snap().getChangeRange(oldSnapshot);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
interface TimestampedResolvedModule extends ResolvedModuleWithFailedLookupLocations {
|
||||
lastCheckTime: number;
|
||||
lastCheckTime: number;
|
||||
}
|
||||
|
||||
|
||||
export class LSHost implements ts.LanguageServiceHost {
|
||||
ls: ts.LanguageService = null;
|
||||
compilationSettings: ts.CompilerOptions;
|
||||
filenameToScript: ts.Map<ScriptInfo> = {};
|
||||
roots: ScriptInfo[] = [];
|
||||
private resolvedModuleNames: ts.FileMap<Map<TimestampedResolvedModule>>;
|
||||
private resolvedModuleNames: ts.FileMap<Map<TimestampedResolvedModule>>;
|
||||
private moduleResolutionHost: ts.ModuleResolutionHost;
|
||||
|
||||
|
||||
constructor(public host: ServerHost, public project: Project) {
|
||||
this.resolvedModuleNames = ts.createFileMap<Map<TimestampedResolvedModule>>(ts.createGetCanonicalFileName(host.useCaseSensitiveFileNames))
|
||||
this.moduleResolutionHost = {
|
||||
@ -98,15 +98,15 @@ namespace ts.server {
|
||||
readFile: fileName => this.host.readFile(fileName)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
resolveModuleNames(moduleNames: string[], containingFile: string): ResolvedModule[] {
|
||||
let currentResolutionsInFile = this.resolvedModuleNames.get(containingFile);
|
||||
|
||||
|
||||
let newResolutions: Map<TimestampedResolvedModule> = {};
|
||||
let resolvedModules: ResolvedModule[] = [];
|
||||
|
||||
|
||||
let compilerOptions = this.getCompilationSettings();
|
||||
|
||||
|
||||
for (let moduleName of moduleNames) {
|
||||
// check if this is a duplicate entry in the list
|
||||
let resolution = lookUp(newResolutions, moduleName);
|
||||
@ -122,21 +122,21 @@ namespace ts.server {
|
||||
newResolutions[moduleName] = resolution;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ts.Debug.assert(resolution !== undefined);
|
||||
|
||||
|
||||
resolvedModules.push(resolution.resolvedModule);
|
||||
}
|
||||
|
||||
// replace old results with a new one
|
||||
this.resolvedModuleNames.set(containingFile, newResolutions);
|
||||
return resolvedModules;
|
||||
|
||||
|
||||
function moduleResolutionIsValid(resolution: TimestampedResolvedModule): boolean {
|
||||
if (!resolution) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (resolution.resolvedModule) {
|
||||
// TODO: consider checking failedLookupLocations
|
||||
// TODO: use lastCheckTime to track expiration for module name resolution
|
||||
@ -147,7 +147,7 @@ namespace ts.server {
|
||||
// after all there is no point to invalidate it if we have no idea where to look for the module.
|
||||
return resolution.failedLookupLocations.length === 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getDefaultLibFileName() {
|
||||
var nodeModuleBinDir = ts.getDirectoryPath(ts.normalizePath(this.host.getExecutingFilePath()));
|
||||
@ -224,12 +224,13 @@ namespace ts.server {
|
||||
this.roots.push(info);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
removeRoot(info: ScriptInfo) {
|
||||
var scriptInfo = ts.lookUp(this.filenameToScript, info.fileName);
|
||||
if (scriptInfo) {
|
||||
this.filenameToScript[info.fileName] = undefined;
|
||||
this.roots = copyListRemovingItem(info, this.roots);
|
||||
this.resolvedModuleNames.remove(info.fileName);
|
||||
}
|
||||
}
|
||||
|
||||
@ -354,6 +355,9 @@ namespace ts.server {
|
||||
compilerService: CompilerService;
|
||||
projectFilename: string;
|
||||
projectFileWatcher: FileWatcher;
|
||||
directoryWatcher: FileWatcher;
|
||||
// Used to keep track of what directories are watched for this project
|
||||
directoriesWatchedForTsconfig: string[] = [];
|
||||
program: ts.Program;
|
||||
filenameToSourceFile: ts.Map<ts.SourceFile> = {};
|
||||
updateGraphSeq = 0;
|
||||
@ -377,6 +381,10 @@ namespace ts.server {
|
||||
return this.projectService.openFile(filename, false);
|
||||
}
|
||||
|
||||
getRootFiles() {
|
||||
return this.compilerService.host.roots.map(info => info.fileName);
|
||||
}
|
||||
|
||||
getFileNames() {
|
||||
let sourceFiles = this.program.getSourceFiles();
|
||||
return sourceFiles.map(sourceFile => sourceFile.fileName);
|
||||
@ -429,13 +437,11 @@ namespace ts.server {
|
||||
|
||||
// add a root file to project
|
||||
addRoot(info: ScriptInfo) {
|
||||
info.defaultProject = this;
|
||||
this.compilerService.host.addRoot(info);
|
||||
}
|
||||
|
||||
// remove a root file from project
|
||||
removeRoot(info: ScriptInfo) {
|
||||
info.defaultProject = undefined;
|
||||
this.compilerService.host.removeRoot(info);
|
||||
}
|
||||
|
||||
@ -491,7 +497,13 @@ namespace ts.server {
|
||||
openFilesReferenced: ScriptInfo[] = [];
|
||||
// open files that are roots of a configured project
|
||||
openFileRootsConfigured: ScriptInfo[] = [];
|
||||
// a path to directory watcher map that detects added tsconfig files
|
||||
directoryWatchersForTsconfig: ts.Map<FileWatcher> = {};
|
||||
// count of how many projects are using the directory watcher. If the
|
||||
// number becomes 0 for a watcher, then we should close it.
|
||||
directoryWatchersRefCount: ts.Map<number> = {};
|
||||
hostConfiguration: HostConfiguration;
|
||||
timerForDetectingProjectFilelistChanges: Map<NodeJS.Timer> = {};
|
||||
|
||||
constructor(public host: ServerHost, public psLogger: Logger, public eventHandler?: ProjectServiceEventHandler) {
|
||||
// ts.disableIncrementalParsing = true;
|
||||
@ -532,8 +544,82 @@ namespace ts.server {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the callback function when a watched directory has added or removed source code files.
|
||||
* @param project the project that associates with this directory watcher
|
||||
* @param fileName the absolute file name that changed in watched directory
|
||||
*/
|
||||
directoryWatchedForSourceFilesChanged(project: Project, fileName: string) {
|
||||
// If a change was made inside "folder/file", node will trigger the callback twice:
|
||||
// one with the fileName being "folder/file", and the other one with "folder".
|
||||
// We don't respond to the second one.
|
||||
if (fileName && !ts.isSupportedSourceFileName(fileName, project.projectOptions ? project.projectOptions.compilerOptions : undefined)) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.log("Detected source file changes: " + fileName);
|
||||
this.startTimerForDetectingProjectFilelistChanges(project);
|
||||
}
|
||||
|
||||
startTimerForDetectingProjectFilelistChanges(project: Project) {
|
||||
if (this.timerForDetectingProjectFilelistChanges[project.projectFilename]) {
|
||||
clearTimeout(this.timerForDetectingProjectFilelistChanges[project.projectFilename]);
|
||||
}
|
||||
this.timerForDetectingProjectFilelistChanges[project.projectFilename] = setTimeout(
|
||||
() => this.handleProjectFilelistChanges(project),
|
||||
250
|
||||
);
|
||||
}
|
||||
|
||||
handleProjectFilelistChanges(project: Project) {
|
||||
let { succeeded, projectOptions, error } = this.configFileToProjectOptions(project.projectFilename);
|
||||
let newRootFiles = projectOptions.files.map((f => this.getCanonicalFileName(f)));
|
||||
let currentRootFiles = project.getRootFiles().map((f => this.getCanonicalFileName(f)));
|
||||
|
||||
if (!arrayStructurallyIsEqualTo(currentRootFiles, newRootFiles)) {
|
||||
// For configured projects, the change is made outside the tsconfig file, and
|
||||
// it is not likely to affect the project for other files opened by the client. We can
|
||||
// just update the current project.
|
||||
this.updateConfiguredProject(project);
|
||||
|
||||
// Call updateProjectStructure to clean up inferred projects we may have
|
||||
// created for the new files
|
||||
this.updateProjectStructure();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This is the callback function when a watched directory has an added tsconfig file.
|
||||
*/
|
||||
directoryWatchedForTsconfigChanged(fileName: string) {
|
||||
if (ts.getBaseFileName(fileName) != "tsconfig.json") {
|
||||
this.log(fileName + " is not tsconfig.json");
|
||||
return;
|
||||
}
|
||||
|
||||
this.log("Detected newly added tsconfig file: " + fileName);
|
||||
|
||||
let { succeeded, projectOptions, error } = this.configFileToProjectOptions(fileName);
|
||||
let rootFilesInTsconfig = projectOptions.files.map(f => this.getCanonicalFileName(f));
|
||||
let openFileRoots = this.openFileRoots.map(s => this.getCanonicalFileName(s.fileName));
|
||||
|
||||
// We should only care about the new tsconfig file if it contains any
|
||||
// opened root files of existing inferred projects
|
||||
for (let openFileRoot of openFileRoots) {
|
||||
if (rootFilesInTsconfig.indexOf(openFileRoot) >= 0) {
|
||||
this.reloadProjects();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getCanonicalFileName(fileName: string) {
|
||||
let name = this.host.useCaseSensitiveFileNames ? fileName : fileName.toLowerCase();
|
||||
return ts.normalizePath(name);
|
||||
}
|
||||
|
||||
watchedProjectConfigFileChanged(project: Project) {
|
||||
this.log("Config File Changed: " + project.projectFilename);
|
||||
this.log("Config file changed: " + project.projectFilename);
|
||||
this.updateConfiguredProject(project);
|
||||
this.updateProjectStructure();
|
||||
}
|
||||
@ -567,11 +653,29 @@ namespace ts.server {
|
||||
}
|
||||
|
||||
createInferredProject(root: ScriptInfo) {
|
||||
var iproj = new Project(this);
|
||||
iproj.addRoot(root);
|
||||
iproj.finishGraph();
|
||||
this.inferredProjects.push(iproj);
|
||||
return iproj;
|
||||
var project = new Project(this);
|
||||
project.addRoot(root);
|
||||
|
||||
let currentPath = ts.getDirectoryPath(root.fileName);
|
||||
let parentPath = ts.getDirectoryPath(currentPath);
|
||||
while (currentPath != parentPath) {
|
||||
if (!project.projectService.directoryWatchersForTsconfig[currentPath]) {
|
||||
this.log("Add watcher for: " + currentPath);
|
||||
project.projectService.directoryWatchersForTsconfig[currentPath] =
|
||||
this.host.watchDirectory(currentPath, fileName => this.directoryWatchedForTsconfigChanged(fileName));
|
||||
project.projectService.directoryWatchersRefCount[currentPath] = 1;
|
||||
}
|
||||
else {
|
||||
project.projectService.directoryWatchersRefCount[currentPath] += 1;
|
||||
}
|
||||
project.directoriesWatchedForTsconfig.push(currentPath);
|
||||
currentPath = parentPath;
|
||||
parentPath = ts.getDirectoryPath(parentPath);
|
||||
}
|
||||
|
||||
project.finishGraph();
|
||||
this.inferredProjects.push(project);
|
||||
return project;
|
||||
}
|
||||
|
||||
fileDeletedInFilesystem(info: ScriptInfo) {
|
||||
@ -585,6 +689,9 @@ namespace ts.server {
|
||||
if (!info.isOpen) {
|
||||
this.filenameToScriptInfo[info.fileName] = undefined;
|
||||
var referencingProjects = this.findReferencingProjects(info);
|
||||
if (info.defaultProject) {
|
||||
info.defaultProject.removeRoot(info);
|
||||
}
|
||||
for (var i = 0, len = referencingProjects.length; i < len; i++) {
|
||||
referencingProjects[i].removeReferencedFile(info);
|
||||
}
|
||||
@ -615,9 +722,24 @@ namespace ts.server {
|
||||
this.configuredProjects = configuredProjects;
|
||||
}
|
||||
|
||||
removeConfiguredProject(project: Project) {
|
||||
project.projectFileWatcher.close();
|
||||
this.configuredProjects = copyListRemovingItem(project, this.configuredProjects);
|
||||
removeProject(project: Project) {
|
||||
this.log("remove project: " + project.getRootFiles().toString());
|
||||
if (project.isConfiguredProject()) {
|
||||
project.projectFileWatcher.close();
|
||||
project.directoryWatcher.close();
|
||||
this.configuredProjects = copyListRemovingItem(project, this.configuredProjects);
|
||||
}
|
||||
else {
|
||||
for (let directory of project.directoriesWatchedForTsconfig) {
|
||||
// if the ref count for this directory watcher drops to 0, it's time to close it
|
||||
if (!(--project.projectService.directoryWatchersRefCount[directory])) {
|
||||
this.log("Close directory watcher for: " + directory);
|
||||
project.projectService.directoryWatchersForTsconfig[directory].close();
|
||||
delete project.projectService.directoryWatchersForTsconfig[directory];
|
||||
}
|
||||
}
|
||||
this.inferredProjects = copyListRemovingItem(project, this.inferredProjects);
|
||||
}
|
||||
|
||||
let fileNames = project.getFileNames();
|
||||
for (let fileName of fileNames) {
|
||||
@ -659,8 +781,7 @@ namespace ts.server {
|
||||
// if r referenced by the new project
|
||||
if (info.defaultProject.getSourceFile(r)) {
|
||||
// remove project rooted at r
|
||||
this.inferredProjects =
|
||||
copyListRemovingItem(r.defaultProject, this.inferredProjects);
|
||||
this.removeProject(r.defaultProject);
|
||||
// put r in referenced open file list
|
||||
this.openFilesReferenced.push(r);
|
||||
// set default project of r to the new project
|
||||
@ -683,6 +804,11 @@ namespace ts.server {
|
||||
* @param info The file that has been closed or newly configured
|
||||
*/
|
||||
closeOpenFile(info: ScriptInfo) {
|
||||
// Closing file should trigger re-reading the file content from disk. This is
|
||||
// because the user may chose to discard the buffer content before saving
|
||||
// to the disk, and the server's version of the file can be out of sync.
|
||||
info.svc.reloadFromFile(info.fileName);
|
||||
|
||||
var openFileRoots: ScriptInfo[] = [];
|
||||
var removedProject: Project;
|
||||
for (var i = 0, len = this.openFileRoots.length; i < len; i++) {
|
||||
@ -713,19 +839,14 @@ namespace ts.server {
|
||||
this.openFileRootsConfigured = openFileRootsConfigured;
|
||||
}
|
||||
if (removedProject) {
|
||||
if (removedProject.isConfiguredProject()) {
|
||||
this.configuredProjects = copyListRemovingItem(removedProject, this.configuredProjects);
|
||||
}
|
||||
else {
|
||||
this.inferredProjects = copyListRemovingItem(removedProject, this.inferredProjects);
|
||||
}
|
||||
this.removeProject(removedProject);
|
||||
var openFilesReferenced: ScriptInfo[] = [];
|
||||
var orphanFiles: ScriptInfo[] = [];
|
||||
// for all open, referenced files f
|
||||
for (var i = 0, len = this.openFilesReferenced.length; i < len; i++) {
|
||||
var f = this.openFilesReferenced[i];
|
||||
// if f was referenced by the removed project, remember it
|
||||
if (f.defaultProject === removedProject) {
|
||||
if (f.defaultProject === removedProject || !f.defaultProject) {
|
||||
f.defaultProject = undefined;
|
||||
orphanFiles.push(f);
|
||||
}
|
||||
@ -769,7 +890,11 @@ namespace ts.server {
|
||||
return referencingProjects;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function rebuilds the project for every file opened by the client
|
||||
*/
|
||||
reloadProjects() {
|
||||
this.log("reload projects.");
|
||||
// First check if there is new tsconfig file added for inferred project roots
|
||||
for (let info of this.openFileRoots) {
|
||||
this.openOrUpdateConfiguredProjectForFile(info.fileName);
|
||||
@ -830,14 +955,25 @@ namespace ts.server {
|
||||
var rootFile = this.openFileRoots[i];
|
||||
var rootedProject = rootFile.defaultProject;
|
||||
var referencingProjects = this.findReferencingProjects(rootFile, rootedProject);
|
||||
if (referencingProjects.length === 0) {
|
||||
rootFile.defaultProject = rootedProject;
|
||||
openFileRoots.push(rootFile);
|
||||
|
||||
if (rootFile.defaultProject && rootFile.defaultProject.isConfiguredProject()) {
|
||||
// If the root file has already been added into a configured project,
|
||||
// meaning the original inferred project is gone already.
|
||||
if (!rootedProject.isConfiguredProject()) {
|
||||
this.removeProject(rootedProject);
|
||||
}
|
||||
this.openFileRootsConfigured.push(rootFile);
|
||||
}
|
||||
else {
|
||||
// remove project from inferred projects list because root captured
|
||||
this.inferredProjects = copyListRemovingItem(rootedProject, this.inferredProjects);
|
||||
this.openFilesReferenced.push(rootFile);
|
||||
if (referencingProjects.length === 0) {
|
||||
rootFile.defaultProject = rootedProject;
|
||||
openFileRoots.push(rootFile);
|
||||
}
|
||||
else {
|
||||
// remove project from inferred projects list because root captured
|
||||
this.removeProject(rootedProject);
|
||||
this.openFilesReferenced.push(rootFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.openFileRoots = openFileRoots;
|
||||
@ -922,6 +1058,11 @@ namespace ts.server {
|
||||
return info;
|
||||
}
|
||||
|
||||
/**
|
||||
* This function tries to search for a tsconfig.json for the given file. If we found it,
|
||||
* we first detect if there is already a configured project created for it: if so, we re-read
|
||||
* the tsconfig file content and update the project; otherwise we create a new one.
|
||||
*/
|
||||
openOrUpdateConfiguredProjectForFile(fileName: string) {
|
||||
let searchPath = ts.normalizePath(getDirectoryPath(fileName));
|
||||
this.log("Search path: " + searchPath, "Info");
|
||||
@ -1041,17 +1182,17 @@ namespace ts.server {
|
||||
// file references will be relative to dirPath (or absolute)
|
||||
var dirPath = ts.getDirectoryPath(configFilename);
|
||||
var contents = this.host.readFile(configFilename)
|
||||
var rawConfig: { config?: ProjectOptions; error?: Diagnostic; } = ts.parseConfigFileText(configFilename, contents);
|
||||
var rawConfig: { config?: ProjectOptions; error?: Diagnostic; } = ts.parseConfigFileTextToJson(configFilename, contents);
|
||||
if (rawConfig.error) {
|
||||
return { succeeded: false, error: rawConfig.error };
|
||||
}
|
||||
else {
|
||||
var parsedCommandLine = ts.parseConfigFile(rawConfig.config, this.host, dirPath);
|
||||
var parsedCommandLine = ts.parseJsonConfigFileContent(rawConfig.config, this.host, dirPath);
|
||||
if (parsedCommandLine.errors && (parsedCommandLine.errors.length > 0)) {
|
||||
return { succeeded: false, error: { errorMsg: "tsconfig option errors" } };
|
||||
}
|
||||
else if (parsedCommandLine.fileNames == null) {
|
||||
return { succeeded: false, error: { errorMsg: "no files found" } }
|
||||
return { succeeded: false, error: { errorMsg: "no files found" } };
|
||||
}
|
||||
else {
|
||||
var projectOptions: ProjectOptions = {
|
||||
@ -1070,27 +1211,32 @@ namespace ts.server {
|
||||
return error;
|
||||
}
|
||||
else {
|
||||
let proj = this.createProject(configFilename, projectOptions);
|
||||
for (let i = 0, len = projectOptions.files.length; i < len; i++) {
|
||||
let rootFilename = projectOptions.files[i];
|
||||
let project = this.createProject(configFilename, projectOptions);
|
||||
for (let rootFilename of projectOptions.files) {
|
||||
if (this.host.fileExists(rootFilename)) {
|
||||
let info = this.openFile(rootFilename, /*openedByClient*/ clientFileName == rootFilename);
|
||||
proj.addRoot(info);
|
||||
project.addRoot(info);
|
||||
}
|
||||
else {
|
||||
return { errorMsg: "specified file " + rootFilename + " not found" };
|
||||
}
|
||||
}
|
||||
proj.finishGraph();
|
||||
proj.projectFileWatcher = this.host.watchFile(configFilename, _ => this.watchedProjectConfigFileChanged(proj));
|
||||
return { success: true, project: proj };
|
||||
project.finishGraph();
|
||||
project.projectFileWatcher = this.host.watchFile(configFilename, _ => this.watchedProjectConfigFileChanged(project));
|
||||
this.log("Add recursive watcher for: " + ts.getDirectoryPath(configFilename));
|
||||
project.directoryWatcher = this.host.watchDirectory(
|
||||
ts.getDirectoryPath(configFilename),
|
||||
path => this.directoryWatchedForSourceFilesChanged(project, path),
|
||||
/*recursive*/ true
|
||||
);
|
||||
return { success: true, project: project };
|
||||
}
|
||||
}
|
||||
|
||||
updateConfiguredProject(project: Project) {
|
||||
if (!this.host.fileExists(project.projectFilename)) {
|
||||
this.log("Config file deleted");
|
||||
this.removeConfiguredProject(project);
|
||||
this.removeProject(project);
|
||||
}
|
||||
else {
|
||||
let { succeeded, projectOptions, error } = this.configFileToProjectOptions(project.projectFilename);
|
||||
@ -1105,7 +1251,9 @@ namespace ts.server {
|
||||
|
||||
for (let fileName of fileNamesToRemove) {
|
||||
let info = this.getScriptInfo(fileName);
|
||||
project.removeRoot(info);
|
||||
if (info) {
|
||||
project.removeRoot(info);
|
||||
}
|
||||
}
|
||||
|
||||
for (let fileName of fileNamesToAdd) {
|
||||
@ -1217,9 +1365,9 @@ namespace ts.server {
|
||||
goSubtree: boolean;
|
||||
done: boolean;
|
||||
leaf(relativeStart: number, relativeLength: number, lineCollection: LineLeaf): void;
|
||||
pre? (relativeStart: number, relativeLength: number, lineCollection: LineCollection,
|
||||
pre?(relativeStart: number, relativeLength: number, lineCollection: LineCollection,
|
||||
parent: LineNode, nodeType: CharRangeSection): LineCollection;
|
||||
post? (relativeStart: number, relativeLength: number, lineCollection: LineCollection,
|
||||
post?(relativeStart: number, relativeLength: number, lineCollection: LineCollection,
|
||||
parent: LineNode, nodeType: CharRangeSection): LineCollection;
|
||||
}
|
||||
|
||||
|
||||
@ -11,7 +11,7 @@ namespace ts.server {
|
||||
input: process.stdin,
|
||||
output: process.stdout,
|
||||
terminal: false,
|
||||
});
|
||||
});
|
||||
|
||||
class Logger implements ts.server.Logger {
|
||||
fd = -1;
|
||||
@ -58,7 +58,7 @@ namespace ts.server {
|
||||
isVerbose() {
|
||||
return this.loggingEnabled() && (this.level == "verbose");
|
||||
}
|
||||
|
||||
|
||||
|
||||
msg(s: string, type = "Err") {
|
||||
if (this.fd < 0) {
|
||||
@ -83,95 +83,6 @@ namespace ts.server {
|
||||
}
|
||||
}
|
||||
|
||||
interface WatchedFile {
|
||||
fileName: string;
|
||||
callback: (fileName: string, removed: boolean) => void;
|
||||
mtime: Date;
|
||||
}
|
||||
|
||||
class WatchedFileSet {
|
||||
private watchedFiles: WatchedFile[] = [];
|
||||
private nextFileToCheck = 0;
|
||||
private watchTimer: NodeJS.Timer;
|
||||
|
||||
// average async stat takes about 30 microseconds
|
||||
// set chunk size to do 30 files in < 1 millisecond
|
||||
constructor(public interval = 2500, public chunkSize = 30) {
|
||||
}
|
||||
|
||||
private static copyListRemovingItem<T>(item: T, list: T[]) {
|
||||
var copiedList: T[] = [];
|
||||
for (var i = 0, len = list.length; i < len; i++) {
|
||||
if (list[i] != item) {
|
||||
copiedList.push(list[i]);
|
||||
}
|
||||
}
|
||||
return copiedList;
|
||||
}
|
||||
|
||||
private static getModifiedTime(fileName: string): Date {
|
||||
return fs.statSync(fileName).mtime;
|
||||
}
|
||||
|
||||
private poll(checkedIndex: number) {
|
||||
var watchedFile = this.watchedFiles[checkedIndex];
|
||||
if (!watchedFile) {
|
||||
return;
|
||||
}
|
||||
|
||||
fs.stat(watchedFile.fileName,(err, stats) => {
|
||||
if (err) {
|
||||
watchedFile.callback(watchedFile.fileName, /* removed */ false);
|
||||
}
|
||||
else if (watchedFile.mtime.getTime() !== stats.mtime.getTime()) {
|
||||
watchedFile.mtime = WatchedFileSet.getModifiedTime(watchedFile.fileName);
|
||||
watchedFile.callback(watchedFile.fileName, watchedFile.mtime.getTime() === 0);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// this implementation uses polling and
|
||||
// stat due to inconsistencies of fs.watch
|
||||
// and efficiency of stat on modern filesystems
|
||||
private startWatchTimer() {
|
||||
this.watchTimer = setInterval(() => {
|
||||
var count = 0;
|
||||
var nextToCheck = this.nextFileToCheck;
|
||||
var firstCheck = -1;
|
||||
while ((count < this.chunkSize) && (nextToCheck !== firstCheck)) {
|
||||
this.poll(nextToCheck);
|
||||
if (firstCheck < 0) {
|
||||
firstCheck = nextToCheck;
|
||||
}
|
||||
nextToCheck++;
|
||||
if (nextToCheck === this.watchedFiles.length) {
|
||||
nextToCheck = 0;
|
||||
}
|
||||
count++;
|
||||
}
|
||||
this.nextFileToCheck = nextToCheck;
|
||||
}, this.interval);
|
||||
}
|
||||
|
||||
addFile(fileName: string, callback: (fileName: string, removed: boolean) => void ): WatchedFile {
|
||||
var file: WatchedFile = {
|
||||
fileName,
|
||||
callback,
|
||||
mtime: WatchedFileSet.getModifiedTime(fileName)
|
||||
};
|
||||
|
||||
this.watchedFiles.push(file);
|
||||
if (this.watchedFiles.length === 1) {
|
||||
this.startWatchTimer();
|
||||
}
|
||||
return file;
|
||||
}
|
||||
|
||||
removeFile(file: WatchedFile) {
|
||||
this.watchedFiles = WatchedFileSet.copyListRemovingItem(file, this.watchedFiles);
|
||||
}
|
||||
}
|
||||
|
||||
class IOSession extends Session {
|
||||
constructor(host: ServerHost, logger: ts.server.Logger) {
|
||||
super(host, Buffer.byteLength, process.hrtime, logger);
|
||||
@ -244,31 +155,10 @@ namespace ts.server {
|
||||
|
||||
var logger = createLoggerFromEnv();
|
||||
|
||||
// REVIEW: for now this implementation uses polling.
|
||||
// The advantage of polling is that it works reliably
|
||||
// on all os and with network mounted files.
|
||||
// For 90 referenced files, the average time to detect
|
||||
// changes is 2*msInterval (by default 5 seconds).
|
||||
// The overhead of this is .04 percent (1/2500) with
|
||||
// average pause of < 1 millisecond (and max
|
||||
// pause less than 1.5 milliseconds); question is
|
||||
// do we anticipate reference sets in the 100s and
|
||||
// do we care about waiting 10-20 seconds to detect
|
||||
// changes for large reference sets? If so, do we want
|
||||
// to increase the chunk size or decrease the interval
|
||||
// time dynamically to match the large reference set?
|
||||
var watchedFileSet = new WatchedFileSet();
|
||||
ts.sys.watchFile = function (fileName, callback) {
|
||||
var watchedFile = watchedFileSet.addFile(fileName, callback);
|
||||
return {
|
||||
close: () => watchedFileSet.removeFile(watchedFile)
|
||||
}
|
||||
|
||||
};
|
||||
var ioSession = new IOSession(ts.sys, logger);
|
||||
process.on('uncaughtException', function(err: Error) {
|
||||
ioSession.logError(err, "unknown");
|
||||
});
|
||||
// Start listening
|
||||
ioSession.listen();
|
||||
}
|
||||
}
|
||||
@ -21,6 +21,21 @@ namespace ts.server {
|
||||
return spaceCache[n];
|
||||
}
|
||||
|
||||
export function generateIndentString(n: number, editorOptions: EditorOptions): string {
|
||||
if (editorOptions.ConvertTabsToSpaces) {
|
||||
return generateSpaces(n);
|
||||
} else {
|
||||
var result = "";
|
||||
for (var i = 0; i < Math.floor(n / editorOptions.TabSize); i++) {
|
||||
result += "\t";
|
||||
}
|
||||
for (var i = 0; i < n % editorOptions.TabSize; i++) {
|
||||
result += " ";
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
interface FileStart {
|
||||
file: string;
|
||||
start: ILineInfo;
|
||||
@ -608,27 +623,25 @@ namespace ts.server {
|
||||
ConvertTabsToSpaces: formatOptions.ConvertTabsToSpaces,
|
||||
IndentStyle: ts.IndentStyle.Smart,
|
||||
};
|
||||
var indentPosition =
|
||||
compilerService.languageService.getIndentationAtPosition(file, position, editorOptions);
|
||||
var preferredIndent = compilerService.languageService.getIndentationAtPosition(file, position, editorOptions);
|
||||
var hasIndent = 0;
|
||||
for (var i = 0, len = lineText.length; i < len; i++) {
|
||||
if (lineText.charAt(i) == " ") {
|
||||
indentPosition--;
|
||||
hasIndent++;
|
||||
}
|
||||
else if (lineText.charAt(i) == "\t") {
|
||||
indentPosition -= editorOptions.IndentSize;
|
||||
hasIndent += editorOptions.TabSize;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (indentPosition > 0) {
|
||||
var spaces = generateSpaces(indentPosition);
|
||||
edits.push({ span: ts.createTextSpanFromBounds(position, position), newText: spaces });
|
||||
}
|
||||
else if (indentPosition < 0) {
|
||||
// i points to the first non whitespace character
|
||||
if (preferredIndent !== hasIndent) {
|
||||
var firstNoWhiteSpacePosition = lineInfo.offset + i;
|
||||
edits.push({
|
||||
span: ts.createTextSpanFromBounds(position, position - indentPosition),
|
||||
newText: ""
|
||||
span: ts.createTextSpanFromBounds(lineInfo.offset, firstNoWhiteSpacePosition),
|
||||
newText: generateIndentString(preferredIndent, editorOptions)
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -780,6 +793,7 @@ namespace ts.server {
|
||||
}
|
||||
|
||||
private closeClientFile(fileName: string) {
|
||||
if (!fileName) { return; }
|
||||
var file = ts.normalizePath(fileName);
|
||||
this.projectService.closeClientFile(file);
|
||||
}
|
||||
|
||||
@ -2949,6 +2949,7 @@ namespace ts {
|
||||
let node = currentToken;
|
||||
let isRightOfDot = false;
|
||||
let isRightOfOpenTag = false;
|
||||
let isStartingCloseTag = false;
|
||||
|
||||
let location = getTouchingPropertyName(sourceFile, position);
|
||||
if (contextToken) {
|
||||
@ -2974,9 +2975,14 @@ namespace ts {
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
else if (kind === SyntaxKind.LessThanToken && sourceFile.languageVariant === LanguageVariant.JSX) {
|
||||
isRightOfOpenTag = true;
|
||||
location = contextToken;
|
||||
else if (sourceFile.languageVariant === LanguageVariant.JSX) {
|
||||
if (kind === SyntaxKind.LessThanToken) {
|
||||
isRightOfOpenTag = true;
|
||||
location = contextToken;
|
||||
}
|
||||
else if (kind === SyntaxKind.SlashToken && contextToken.parent.kind === SyntaxKind.JsxClosingElement) {
|
||||
isStartingCloseTag = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -2999,6 +3005,13 @@ namespace ts {
|
||||
isMemberCompletion = true;
|
||||
isNewIdentifierLocation = false;
|
||||
}
|
||||
else if (isStartingCloseTag) {
|
||||
let tagName = (<JsxElement>contextToken.parent.parent).openingElement.tagName;
|
||||
symbols = [typeChecker.getSymbolAtLocation(tagName)];
|
||||
|
||||
isMemberCompletion = true;
|
||||
isNewIdentifierLocation = false;
|
||||
}
|
||||
else {
|
||||
// For JavaScript or TypeScript, if we're not after a dot, then just try to get the
|
||||
// global symbols in scope. These results should be valid for either language as
|
||||
@ -3155,11 +3168,29 @@ namespace ts {
|
||||
let start = new Date().getTime();
|
||||
let result = isInStringOrRegularExpressionOrTemplateLiteral(contextToken) ||
|
||||
isSolelyIdentifierDefinitionLocation(contextToken) ||
|
||||
isDotOfNumericLiteral(contextToken);
|
||||
isDotOfNumericLiteral(contextToken) ||
|
||||
isInJsxText(contextToken);
|
||||
log("getCompletionsAtPosition: isCompletionListBlocker: " + (new Date().getTime() - start));
|
||||
return result;
|
||||
}
|
||||
|
||||
function isInJsxText(contextToken: Node): boolean {
|
||||
if (contextToken.kind === SyntaxKind.JsxText) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (contextToken.kind === SyntaxKind.GreaterThanToken && contextToken.parent) {
|
||||
if (contextToken.parent.kind === SyntaxKind.JsxOpeningElement) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (contextToken.parent.kind === SyntaxKind.JsxClosingElement || contextToken.parent.kind === SyntaxKind.JsxSelfClosingElement) {
|
||||
return contextToken.parent.parent && contextToken.parent.parent.kind === SyntaxKind.JsxElement;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function isNewIdentifierDefinitionLocation(previousToken: Node): boolean {
|
||||
if (previousToken) {
|
||||
let containingNodeKind = previousToken.parent.kind;
|
||||
@ -3949,8 +3980,9 @@ namespace ts {
|
||||
let useConstructSignatures = callExpression.kind === SyntaxKind.NewExpression || callExpression.expression.kind === SyntaxKind.SuperKeyword;
|
||||
let allSignatures = useConstructSignatures ? type.getConstructSignatures() : type.getCallSignatures();
|
||||
|
||||
if (!contains(allSignatures, signature.target || signature)) {
|
||||
// Get the first signature if there
|
||||
if (!contains(allSignatures, signature.target) && !contains(allSignatures, signature)) {
|
||||
// Get the first signature if there is one -- allSignatures may contain
|
||||
// either the original signature or its target, so check for either
|
||||
signature = allSignatures.length ? allSignatures[0] : undefined;
|
||||
}
|
||||
|
||||
|
||||
@ -990,7 +990,7 @@ namespace ts {
|
||||
() => {
|
||||
let text = sourceTextSnapshot.getText(0, sourceTextSnapshot.getLength());
|
||||
|
||||
let result = parseConfigFileText(fileName, text);
|
||||
let result = parseConfigFileTextToJson(fileName, text);
|
||||
|
||||
if (result.error) {
|
||||
return {
|
||||
@ -1000,7 +1000,7 @@ namespace ts {
|
||||
};
|
||||
}
|
||||
|
||||
var configFile = parseConfigFile(result.config, this.host, getDirectoryPath(normalizeSlashes(fileName)));
|
||||
var configFile = parseJsonConfigFileContent(result.config, this.host, getDirectoryPath(normalizeSlashes(fileName)));
|
||||
|
||||
return {
|
||||
options: configFile.options,
|
||||
|
||||
@ -75,26 +75,26 @@ function delint(sourceFile) {
|
||||
delintNode(sourceFile);
|
||||
function delintNode(node) {
|
||||
switch (node.kind) {
|
||||
case 197 /* ForStatement */:
|
||||
case 198 /* ForInStatement */:
|
||||
case 196 /* WhileStatement */:
|
||||
case 195 /* DoStatement */:
|
||||
if (node.statement.kind !== 190 /* Block */) {
|
||||
case 199 /* ForStatement */:
|
||||
case 200 /* ForInStatement */:
|
||||
case 198 /* WhileStatement */:
|
||||
case 197 /* DoStatement */:
|
||||
if (node.statement.kind !== 192 /* Block */) {
|
||||
report(node, "A looping statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
break;
|
||||
case 194 /* IfStatement */:
|
||||
case 196 /* IfStatement */:
|
||||
var ifStatement = node;
|
||||
if (ifStatement.thenStatement.kind !== 190 /* Block */) {
|
||||
if (ifStatement.thenStatement.kind !== 192 /* Block */) {
|
||||
report(ifStatement.thenStatement, "An if statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
if (ifStatement.elseStatement &&
|
||||
ifStatement.elseStatement.kind !== 190 /* Block */ &&
|
||||
ifStatement.elseStatement.kind !== 194 /* IfStatement */) {
|
||||
ifStatement.elseStatement.kind !== 192 /* Block */ &&
|
||||
ifStatement.elseStatement.kind !== 196 /* IfStatement */) {
|
||||
report(ifStatement.elseStatement, "An else statement's contents should be wrapped in a block body.");
|
||||
}
|
||||
break;
|
||||
case 179 /* BinaryExpression */:
|
||||
case 181 /* BinaryExpression */:
|
||||
var op = node.operatorToken.kind;
|
||||
if (op === 30 /* EqualsEqualsToken */ || op == 31 /* ExclamationEqualsToken */) {
|
||||
report(node, "Use '===' and '!=='.");
|
||||
|
||||
@ -0,0 +1,118 @@
|
||||
tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(2,13): error TS2448: Block-scoped variable 'x' used before its declaration.
|
||||
tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(58,20): error TS2448: Block-scoped variable 'x' used before its declaration.
|
||||
tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(65,20): error TS2448: Block-scoped variable 'x' used before its declaration.
|
||||
tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts(100,12): error TS2448: Block-scoped variable 'x' used before its declaration.
|
||||
|
||||
|
||||
==== tests/cases/compiler/blockScopedVariablesUseBeforeDef.ts (4 errors) ====
|
||||
function foo0() {
|
||||
let a = x;
|
||||
~
|
||||
!!! error TS2448: Block-scoped variable 'x' used before its declaration.
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo1() {
|
||||
let a = () => x;
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo2() {
|
||||
let a = function () { return x; }
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo3() {
|
||||
class X {
|
||||
m() { return x;}
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo4() {
|
||||
let y = class {
|
||||
m() { return x; }
|
||||
};
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo5() {
|
||||
let x = () => y;
|
||||
let y = () => x;
|
||||
}
|
||||
|
||||
function foo6() {
|
||||
function f() {
|
||||
return x;
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo7() {
|
||||
class A {
|
||||
a = x;
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo8() {
|
||||
let y = class {
|
||||
a = x;
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo9() {
|
||||
let y = class {
|
||||
static a = x;
|
||||
~
|
||||
!!! error TS2448: Block-scoped variable 'x' used before its declaration.
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo10() {
|
||||
class A {
|
||||
static a = x;
|
||||
~
|
||||
!!! error TS2448: Block-scoped variable 'x' used before its declaration.
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo11() {
|
||||
function f () {
|
||||
let y = class {
|
||||
static a = x;
|
||||
}
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo12() {
|
||||
function f () {
|
||||
let y = class {
|
||||
a;
|
||||
constructor() {
|
||||
this.a = x;
|
||||
}
|
||||
}
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo13() {
|
||||
let a = {
|
||||
get a() { return x }
|
||||
}
|
||||
let x
|
||||
}
|
||||
|
||||
function foo14() {
|
||||
let a = {
|
||||
a: x
|
||||
~
|
||||
!!! error TS2448: Block-scoped variable 'x' used before its declaration.
|
||||
}
|
||||
let x
|
||||
}
|
||||
216
tests/baselines/reference/blockScopedVariablesUseBeforeDef.js
Normal file
216
tests/baselines/reference/blockScopedVariablesUseBeforeDef.js
Normal file
@ -0,0 +1,216 @@
|
||||
//// [blockScopedVariablesUseBeforeDef.ts]
|
||||
function foo0() {
|
||||
let a = x;
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo1() {
|
||||
let a = () => x;
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo2() {
|
||||
let a = function () { return x; }
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo3() {
|
||||
class X {
|
||||
m() { return x;}
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo4() {
|
||||
let y = class {
|
||||
m() { return x; }
|
||||
};
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo5() {
|
||||
let x = () => y;
|
||||
let y = () => x;
|
||||
}
|
||||
|
||||
function foo6() {
|
||||
function f() {
|
||||
return x;
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo7() {
|
||||
class A {
|
||||
a = x;
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo8() {
|
||||
let y = class {
|
||||
a = x;
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo9() {
|
||||
let y = class {
|
||||
static a = x;
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo10() {
|
||||
class A {
|
||||
static a = x;
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo11() {
|
||||
function f () {
|
||||
let y = class {
|
||||
static a = x;
|
||||
}
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo12() {
|
||||
function f () {
|
||||
let y = class {
|
||||
a;
|
||||
constructor() {
|
||||
this.a = x;
|
||||
}
|
||||
}
|
||||
}
|
||||
let x;
|
||||
}
|
||||
|
||||
function foo13() {
|
||||
let a = {
|
||||
get a() { return x }
|
||||
}
|
||||
let x
|
||||
}
|
||||
|
||||
function foo14() {
|
||||
let a = {
|
||||
a: x
|
||||
}
|
||||
let x
|
||||
}
|
||||
|
||||
//// [blockScopedVariablesUseBeforeDef.js]
|
||||
function foo0() {
|
||||
var a = x;
|
||||
var x;
|
||||
}
|
||||
function foo1() {
|
||||
var a = function () { return x; };
|
||||
var x;
|
||||
}
|
||||
function foo2() {
|
||||
var a = function () { return x; };
|
||||
var x;
|
||||
}
|
||||
function foo3() {
|
||||
var X = (function () {
|
||||
function X() {
|
||||
}
|
||||
X.prototype.m = function () { return x; };
|
||||
return X;
|
||||
})();
|
||||
var x;
|
||||
}
|
||||
function foo4() {
|
||||
var y = (function () {
|
||||
function class_1() {
|
||||
}
|
||||
class_1.prototype.m = function () { return x; };
|
||||
return class_1;
|
||||
})();
|
||||
var x;
|
||||
}
|
||||
function foo5() {
|
||||
var x = function () { return y; };
|
||||
var y = function () { return x; };
|
||||
}
|
||||
function foo6() {
|
||||
function f() {
|
||||
return x;
|
||||
}
|
||||
var x;
|
||||
}
|
||||
function foo7() {
|
||||
var A = (function () {
|
||||
function A() {
|
||||
this.a = x;
|
||||
}
|
||||
return A;
|
||||
})();
|
||||
var x;
|
||||
}
|
||||
function foo8() {
|
||||
var y = (function () {
|
||||
function class_2() {
|
||||
this.a = x;
|
||||
}
|
||||
return class_2;
|
||||
})();
|
||||
var x;
|
||||
}
|
||||
function foo9() {
|
||||
var y = (function () {
|
||||
function class_3() {
|
||||
}
|
||||
class_3.a = x;
|
||||
return class_3;
|
||||
})();
|
||||
var x;
|
||||
}
|
||||
function foo10() {
|
||||
var A = (function () {
|
||||
function A() {
|
||||
}
|
||||
A.a = x;
|
||||
return A;
|
||||
})();
|
||||
var x;
|
||||
}
|
||||
function foo11() {
|
||||
function f() {
|
||||
var y = (function () {
|
||||
function class_4() {
|
||||
}
|
||||
class_4.a = x;
|
||||
return class_4;
|
||||
})();
|
||||
}
|
||||
var x;
|
||||
}
|
||||
function foo12() {
|
||||
function f() {
|
||||
var y = (function () {
|
||||
function class_5() {
|
||||
this.a = x;
|
||||
}
|
||||
return class_5;
|
||||
})();
|
||||
}
|
||||
var x;
|
||||
}
|
||||
function foo13() {
|
||||
var a = {
|
||||
get a() { return x; }
|
||||
};
|
||||
var x;
|
||||
}
|
||||
function foo14() {
|
||||
var a = {
|
||||
a: x
|
||||
};
|
||||
var x;
|
||||
}
|
||||
@ -0,0 +1,56 @@
|
||||
//// [compoundExponentiationAssignmentLHSCanBeAssigned1.ts]
|
||||
enum E { a, b, c }
|
||||
|
||||
var a: any;
|
||||
var b: number;
|
||||
var c: E;
|
||||
|
||||
var x1: any;
|
||||
x1 **= a;
|
||||
x1 **= b;
|
||||
x1 **= c;
|
||||
x1 **= null;
|
||||
x1 **= undefined;
|
||||
|
||||
var x2: number;
|
||||
x2 **= a;
|
||||
x2 **= b;
|
||||
x2 **= c;
|
||||
x2 **= null;
|
||||
x2 **= undefined;
|
||||
|
||||
var x3: E;
|
||||
x3 **= a;
|
||||
x3 **= b;
|
||||
x3 **= c;
|
||||
x3 **= null;
|
||||
x3 **= undefined;
|
||||
|
||||
//// [compoundExponentiationAssignmentLHSCanBeAssigned1.js]
|
||||
var E;
|
||||
(function (E) {
|
||||
E[E["a"] = 0] = "a";
|
||||
E[E["b"] = 1] = "b";
|
||||
E[E["c"] = 2] = "c";
|
||||
})(E || (E = {}));
|
||||
var a;
|
||||
var b;
|
||||
var c;
|
||||
var x1;
|
||||
x1 = Math.pow(x1, a);
|
||||
x1 = Math.pow(x1, b);
|
||||
x1 = Math.pow(x1, c);
|
||||
x1 = Math.pow(x1, null);
|
||||
x1 = Math.pow(x1, undefined);
|
||||
var x2;
|
||||
x2 = Math.pow(x2, a);
|
||||
x2 = Math.pow(x2, b);
|
||||
x2 = Math.pow(x2, c);
|
||||
x2 = Math.pow(x2, null);
|
||||
x2 = Math.pow(x2, undefined);
|
||||
var x3;
|
||||
x3 = Math.pow(x3, a);
|
||||
x3 = Math.pow(x3, b);
|
||||
x3 = Math.pow(x3, c);
|
||||
x3 = Math.pow(x3, null);
|
||||
x3 = Math.pow(x3, undefined);
|
||||
@ -0,0 +1,84 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts ===
|
||||
enum E { a, b, c }
|
||||
>E : Symbol(E, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 0, 0))
|
||||
>a : Symbol(E.a, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 0, 8))
|
||||
>b : Symbol(E.b, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 0, 11))
|
||||
>c : Symbol(E.c, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 0, 14))
|
||||
|
||||
var a: any;
|
||||
>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 2, 3))
|
||||
|
||||
var b: number;
|
||||
>b : Symbol(b, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 3, 3))
|
||||
|
||||
var c: E;
|
||||
>c : Symbol(c, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 4, 3))
|
||||
>E : Symbol(E, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 0, 0))
|
||||
|
||||
var x1: any;
|
||||
>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 6, 3))
|
||||
|
||||
x1 **= a;
|
||||
>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 6, 3))
|
||||
>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 2, 3))
|
||||
|
||||
x1 **= b;
|
||||
>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 6, 3))
|
||||
>b : Symbol(b, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 3, 3))
|
||||
|
||||
x1 **= c;
|
||||
>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 6, 3))
|
||||
>c : Symbol(c, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 4, 3))
|
||||
|
||||
x1 **= null;
|
||||
>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 6, 3))
|
||||
|
||||
x1 **= undefined;
|
||||
>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 6, 3))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
var x2: number;
|
||||
>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 13, 3))
|
||||
|
||||
x2 **= a;
|
||||
>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 13, 3))
|
||||
>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 2, 3))
|
||||
|
||||
x2 **= b;
|
||||
>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 13, 3))
|
||||
>b : Symbol(b, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 3, 3))
|
||||
|
||||
x2 **= c;
|
||||
>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 13, 3))
|
||||
>c : Symbol(c, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 4, 3))
|
||||
|
||||
x2 **= null;
|
||||
>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 13, 3))
|
||||
|
||||
x2 **= undefined;
|
||||
>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 13, 3))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
var x3: E;
|
||||
>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 20, 3))
|
||||
>E : Symbol(E, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 0, 0))
|
||||
|
||||
x3 **= a;
|
||||
>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 20, 3))
|
||||
>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 2, 3))
|
||||
|
||||
x3 **= b;
|
||||
>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 20, 3))
|
||||
>b : Symbol(b, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 3, 3))
|
||||
|
||||
x3 **= c;
|
||||
>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 20, 3))
|
||||
>c : Symbol(c, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 4, 3))
|
||||
|
||||
x3 **= null;
|
||||
>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 20, 3))
|
||||
|
||||
x3 **= undefined;
|
||||
>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSCanBeAssigned1.ts, 20, 3))
|
||||
>undefined : Symbol(undefined)
|
||||
|
||||
@ -0,0 +1,102 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCanBeAssigned1.ts ===
|
||||
enum E { a, b, c }
|
||||
>E : E
|
||||
>a : E
|
||||
>b : E
|
||||
>c : E
|
||||
|
||||
var a: any;
|
||||
>a : any
|
||||
|
||||
var b: number;
|
||||
>b : number
|
||||
|
||||
var c: E;
|
||||
>c : E
|
||||
>E : E
|
||||
|
||||
var x1: any;
|
||||
>x1 : any
|
||||
|
||||
x1 **= a;
|
||||
>x1 **= a : number
|
||||
>x1 : any
|
||||
>a : any
|
||||
|
||||
x1 **= b;
|
||||
>x1 **= b : number
|
||||
>x1 : any
|
||||
>b : number
|
||||
|
||||
x1 **= c;
|
||||
>x1 **= c : number
|
||||
>x1 : any
|
||||
>c : E
|
||||
|
||||
x1 **= null;
|
||||
>x1 **= null : number
|
||||
>x1 : any
|
||||
>null : null
|
||||
|
||||
x1 **= undefined;
|
||||
>x1 **= undefined : number
|
||||
>x1 : any
|
||||
>undefined : undefined
|
||||
|
||||
var x2: number;
|
||||
>x2 : number
|
||||
|
||||
x2 **= a;
|
||||
>x2 **= a : number
|
||||
>x2 : number
|
||||
>a : any
|
||||
|
||||
x2 **= b;
|
||||
>x2 **= b : number
|
||||
>x2 : number
|
||||
>b : number
|
||||
|
||||
x2 **= c;
|
||||
>x2 **= c : number
|
||||
>x2 : number
|
||||
>c : E
|
||||
|
||||
x2 **= null;
|
||||
>x2 **= null : number
|
||||
>x2 : number
|
||||
>null : null
|
||||
|
||||
x2 **= undefined;
|
||||
>x2 **= undefined : number
|
||||
>x2 : number
|
||||
>undefined : undefined
|
||||
|
||||
var x3: E;
|
||||
>x3 : E
|
||||
>E : E
|
||||
|
||||
x3 **= a;
|
||||
>x3 **= a : number
|
||||
>x3 : E
|
||||
>a : any
|
||||
|
||||
x3 **= b;
|
||||
>x3 **= b : number
|
||||
>x3 : E
|
||||
>b : number
|
||||
|
||||
x3 **= c;
|
||||
>x3 **= c : number
|
||||
>x3 : E
|
||||
>c : E
|
||||
|
||||
x3 **= null;
|
||||
>x3 **= null : number
|
||||
>x3 : E
|
||||
>null : null
|
||||
|
||||
x3 **= undefined;
|
||||
>x3 **= undefined : number
|
||||
>x3 : E
|
||||
>undefined : undefined
|
||||
|
||||
@ -0,0 +1,267 @@
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(8,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(8,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(9,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(9,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(10,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(11,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(11,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(12,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(13,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(13,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(14,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(14,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(15,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(15,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(18,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(19,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(19,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(20,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(20,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(21,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(22,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(22,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(23,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(24,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(24,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(25,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(25,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(26,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(26,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(29,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(30,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(30,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(31,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(31,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(32,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(33,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(33,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(34,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(35,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(35,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(36,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(36,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(37,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(37,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(40,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(41,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(41,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(42,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(42,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(43,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(44,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(44,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(45,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(46,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(46,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(47,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(47,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(48,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(48,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(51,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(52,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(53,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(54,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(57,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(58,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(59,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts(60,8): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSCannotBeAssigned.ts (68 errors) ====
|
||||
enum E { a, b }
|
||||
|
||||
var a: any;
|
||||
var b: void;
|
||||
|
||||
var x1: boolean;
|
||||
x1 **= a;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x1 **= b;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x1 **= true;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x1 **= 0;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x1 **= ''
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x1 **= E.a;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x1 **= {};
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x1 **= null;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x1 **= undefined;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
var x2: string;
|
||||
x2 **= a;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x2 **= b;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x2 **= true;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x2 **= 0;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x2 **= ''
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x2 **= E.a;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x2 **= {};
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x2 **= null;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x2 **= undefined;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
var x3: {};
|
||||
x3 **= a;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x3 **= b;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x3 **= true;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x3 **= 0;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x3 **= ''
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x3 **= E.a;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x3 **= {};
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x3 **= null;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x3 **= undefined;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
var x4: void;
|
||||
x4 **= a;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x4 **= b;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x4 **= true;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x4 **= 0;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x4 **= ''
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x4 **= E.a;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x4 **= {};
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x4 **= null;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x4 **= undefined;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
~~~~~~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
var x5: number;
|
||||
x5 **= b;
|
||||
~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x5 **= true;
|
||||
~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x5 **= ''
|
||||
~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x5 **= {};
|
||||
~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
var x6: E;
|
||||
x6 **= b;
|
||||
~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x6 **= true;
|
||||
~~~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x6 **= ''
|
||||
~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
x6 **= {};
|
||||
~~
|
||||
!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
@ -0,0 +1,120 @@
|
||||
//// [compoundExponentiationAssignmentLHSCannotBeAssigned.ts]
|
||||
enum E { a, b }
|
||||
|
||||
var a: any;
|
||||
var b: void;
|
||||
|
||||
var x1: boolean;
|
||||
x1 **= a;
|
||||
x1 **= b;
|
||||
x1 **= true;
|
||||
x1 **= 0;
|
||||
x1 **= ''
|
||||
x1 **= E.a;
|
||||
x1 **= {};
|
||||
x1 **= null;
|
||||
x1 **= undefined;
|
||||
|
||||
var x2: string;
|
||||
x2 **= a;
|
||||
x2 **= b;
|
||||
x2 **= true;
|
||||
x2 **= 0;
|
||||
x2 **= ''
|
||||
x2 **= E.a;
|
||||
x2 **= {};
|
||||
x2 **= null;
|
||||
x2 **= undefined;
|
||||
|
||||
var x3: {};
|
||||
x3 **= a;
|
||||
x3 **= b;
|
||||
x3 **= true;
|
||||
x3 **= 0;
|
||||
x3 **= ''
|
||||
x3 **= E.a;
|
||||
x3 **= {};
|
||||
x3 **= null;
|
||||
x3 **= undefined;
|
||||
|
||||
var x4: void;
|
||||
x4 **= a;
|
||||
x4 **= b;
|
||||
x4 **= true;
|
||||
x4 **= 0;
|
||||
x4 **= ''
|
||||
x4 **= E.a;
|
||||
x4 **= {};
|
||||
x4 **= null;
|
||||
x4 **= undefined;
|
||||
|
||||
var x5: number;
|
||||
x5 **= b;
|
||||
x5 **= true;
|
||||
x5 **= ''
|
||||
x5 **= {};
|
||||
|
||||
var x6: E;
|
||||
x6 **= b;
|
||||
x6 **= true;
|
||||
x6 **= ''
|
||||
x6 **= {};
|
||||
|
||||
//// [compoundExponentiationAssignmentLHSCannotBeAssigned.js]
|
||||
var E;
|
||||
(function (E) {
|
||||
E[E["a"] = 0] = "a";
|
||||
E[E["b"] = 1] = "b";
|
||||
})(E || (E = {}));
|
||||
var a;
|
||||
var b;
|
||||
var x1;
|
||||
x1 = Math.pow(x1, a);
|
||||
x1 = Math.pow(x1, b);
|
||||
x1 = Math.pow(x1, true);
|
||||
x1 = Math.pow(x1, 0);
|
||||
x1 = Math.pow(x1, '');
|
||||
x1 = Math.pow(x1, E.a);
|
||||
x1 = Math.pow(x1, {});
|
||||
x1 = Math.pow(x1, null);
|
||||
x1 = Math.pow(x1, undefined);
|
||||
var x2;
|
||||
x2 = Math.pow(x2, a);
|
||||
x2 = Math.pow(x2, b);
|
||||
x2 = Math.pow(x2, true);
|
||||
x2 = Math.pow(x2, 0);
|
||||
x2 = Math.pow(x2, '');
|
||||
x2 = Math.pow(x2, E.a);
|
||||
x2 = Math.pow(x2, {});
|
||||
x2 = Math.pow(x2, null);
|
||||
x2 = Math.pow(x2, undefined);
|
||||
var x3;
|
||||
x3 = Math.pow(x3, a);
|
||||
x3 = Math.pow(x3, b);
|
||||
x3 = Math.pow(x3, true);
|
||||
x3 = Math.pow(x3, 0);
|
||||
x3 = Math.pow(x3, '');
|
||||
x3 = Math.pow(x3, E.a);
|
||||
x3 = Math.pow(x3, {});
|
||||
x3 = Math.pow(x3, null);
|
||||
x3 = Math.pow(x3, undefined);
|
||||
var x4;
|
||||
x4 = Math.pow(x4, a);
|
||||
x4 = Math.pow(x4, b);
|
||||
x4 = Math.pow(x4, true);
|
||||
x4 = Math.pow(x4, 0);
|
||||
x4 = Math.pow(x4, '');
|
||||
x4 = Math.pow(x4, E.a);
|
||||
x4 = Math.pow(x4, {});
|
||||
x4 = Math.pow(x4, null);
|
||||
x4 = Math.pow(x4, undefined);
|
||||
var x5;
|
||||
x5 = Math.pow(x5, b);
|
||||
x5 = Math.pow(x5, true);
|
||||
x5 = Math.pow(x5, '');
|
||||
x5 = Math.pow(x5, {});
|
||||
var x6;
|
||||
x6 = Math.pow(x6, b);
|
||||
x6 = Math.pow(x6, true);
|
||||
x6 = Math.pow(x6, '');
|
||||
x6 = Math.pow(x6, {});
|
||||
@ -0,0 +1,48 @@
|
||||
//// [compoundExponentiationAssignmentLHSIsReference.ts]
|
||||
var value;
|
||||
|
||||
// identifiers: variable and parameter
|
||||
var x1: number;
|
||||
x1 **= value;
|
||||
|
||||
function fn1(x2: number) {
|
||||
x2 **= value;
|
||||
}
|
||||
|
||||
// property accesses
|
||||
var x3: { a: number };
|
||||
x3.a **= value;
|
||||
|
||||
x3['a'] **= value;
|
||||
|
||||
// parentheses, the contained expression is reference
|
||||
(x1) **= value;
|
||||
|
||||
function fn2(x4: number) {
|
||||
(x4) **= value;
|
||||
}
|
||||
|
||||
(x3.a) **= value;
|
||||
|
||||
(x3['a']) **= value;
|
||||
|
||||
//// [compoundExponentiationAssignmentLHSIsReference.js]
|
||||
var value;
|
||||
// identifiers: variable and parameter
|
||||
var x1;
|
||||
x1 = Math.pow(x1, value);
|
||||
function fn1(x2) {
|
||||
x2 = Math.pow(x2, value);
|
||||
}
|
||||
// property accesses
|
||||
var x3;
|
||||
(_a = x3, _a.a = Math.pow(_a.a, value));
|
||||
(_b = x3, _b['a'] = Math.pow(_b['a'], value));
|
||||
// parentheses, the contained expression is reference
|
||||
(x1) = Math.pow((x1), value);
|
||||
function fn2(x4) {
|
||||
(x4) = Math.pow((x4), value);
|
||||
}
|
||||
(x3.a) = Math.pow((x3.a), value);
|
||||
(x3['a']) = Math.pow((x3['a']), value);
|
||||
var _a, _b;
|
||||
@ -0,0 +1,62 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsReference.ts ===
|
||||
var value;
|
||||
>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3))
|
||||
|
||||
// identifiers: variable and parameter
|
||||
var x1: number;
|
||||
>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 3, 3))
|
||||
|
||||
x1 **= value;
|
||||
>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 3, 3))
|
||||
>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3))
|
||||
|
||||
function fn1(x2: number) {
|
||||
>fn1 : Symbol(fn1, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 4, 13))
|
||||
>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 6, 13))
|
||||
|
||||
x2 **= value;
|
||||
>x2 : Symbol(x2, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 6, 13))
|
||||
>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3))
|
||||
}
|
||||
|
||||
// property accesses
|
||||
var x3: { a: number };
|
||||
>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 3))
|
||||
>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9))
|
||||
|
||||
x3.a **= value;
|
||||
>x3.a : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9))
|
||||
>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 3))
|
||||
>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9))
|
||||
>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3))
|
||||
|
||||
x3['a'] **= value;
|
||||
>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 3))
|
||||
>'a' : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9))
|
||||
>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3))
|
||||
|
||||
// parentheses, the contained expression is reference
|
||||
(x1) **= value;
|
||||
>x1 : Symbol(x1, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 3, 3))
|
||||
>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3))
|
||||
|
||||
function fn2(x4: number) {
|
||||
>fn2 : Symbol(fn2, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 17, 15))
|
||||
>x4 : Symbol(x4, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 19, 13))
|
||||
|
||||
(x4) **= value;
|
||||
>x4 : Symbol(x4, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 19, 13))
|
||||
>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3))
|
||||
}
|
||||
|
||||
(x3.a) **= value;
|
||||
>x3.a : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9))
|
||||
>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 3))
|
||||
>a : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9))
|
||||
>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3))
|
||||
|
||||
(x3['a']) **= value;
|
||||
>x3 : Symbol(x3, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 3))
|
||||
>'a' : Symbol(a, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 11, 9))
|
||||
>value : Symbol(value, Decl(compoundExponentiationAssignmentLHSIsReference.ts, 0, 3))
|
||||
|
||||
@ -0,0 +1,76 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsReference.ts ===
|
||||
var value;
|
||||
>value : any
|
||||
|
||||
// identifiers: variable and parameter
|
||||
var x1: number;
|
||||
>x1 : number
|
||||
|
||||
x1 **= value;
|
||||
>x1 **= value : number
|
||||
>x1 : number
|
||||
>value : any
|
||||
|
||||
function fn1(x2: number) {
|
||||
>fn1 : (x2: number) => void
|
||||
>x2 : number
|
||||
|
||||
x2 **= value;
|
||||
>x2 **= value : number
|
||||
>x2 : number
|
||||
>value : any
|
||||
}
|
||||
|
||||
// property accesses
|
||||
var x3: { a: number };
|
||||
>x3 : { a: number; }
|
||||
>a : number
|
||||
|
||||
x3.a **= value;
|
||||
>x3.a **= value : number
|
||||
>x3.a : number
|
||||
>x3 : { a: number; }
|
||||
>a : number
|
||||
>value : any
|
||||
|
||||
x3['a'] **= value;
|
||||
>x3['a'] **= value : number
|
||||
>x3['a'] : number
|
||||
>x3 : { a: number; }
|
||||
>'a' : string
|
||||
>value : any
|
||||
|
||||
// parentheses, the contained expression is reference
|
||||
(x1) **= value;
|
||||
>(x1) **= value : number
|
||||
>(x1) : number
|
||||
>x1 : number
|
||||
>value : any
|
||||
|
||||
function fn2(x4: number) {
|
||||
>fn2 : (x4: number) => void
|
||||
>x4 : number
|
||||
|
||||
(x4) **= value;
|
||||
>(x4) **= value : number
|
||||
>(x4) : number
|
||||
>x4 : number
|
||||
>value : any
|
||||
}
|
||||
|
||||
(x3.a) **= value;
|
||||
>(x3.a) **= value : number
|
||||
>(x3.a) : number
|
||||
>x3.a : number
|
||||
>x3 : { a: number; }
|
||||
>a : number
|
||||
>value : any
|
||||
|
||||
(x3['a']) **= value;
|
||||
>(x3['a']) **= value : number
|
||||
>(x3['a']) : number
|
||||
>x3['a'] : number
|
||||
>x3 : { a: number; }
|
||||
>'a' : string
|
||||
>value : any
|
||||
|
||||
@ -0,0 +1,199 @@
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(7,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(10,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(13,9): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(18,5): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(21,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(25,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(27,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(30,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(32,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(35,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(36,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(37,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(38,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(39,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(40,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(43,10): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(46,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(52,15): error TS1034: 'super' must be followed by an argument list or member access.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(56,15): error TS1034: 'super' must be followed by an argument list or member access.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(60,15): error TS1034: 'super' must be followed by an argument list or member access.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(65,21): error TS1128: Declaration or statement expected.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(66,11): error TS1005: ';' expected.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(69,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(72,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(73,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(74,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(75,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(76,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(77,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(78,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(79,1): error TS2364: Invalid left-hand side of assignment expression.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(80,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(81,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(82,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(83,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(84,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts(85,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
|
||||
==== tests/cases/conformance/es7/exponentiationOperator/compoundExponentiationAssignmentLHSIsValue.ts (37 errors) ====
|
||||
// expected error for all the LHS of compound assignments (arithmetic and addition)
|
||||
var value;
|
||||
|
||||
// this
|
||||
class C {
|
||||
constructor() {
|
||||
this **= value;
|
||||
~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
}
|
||||
foo() {
|
||||
this **= value;
|
||||
~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
}
|
||||
static sfoo() {
|
||||
this **= value;
|
||||
~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
}
|
||||
}
|
||||
|
||||
function foo() {
|
||||
this **= value;
|
||||
~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
}
|
||||
|
||||
this **= value;
|
||||
~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
|
||||
// identifiers: module, class, enum, function
|
||||
module M { export var a; }
|
||||
M **= value;
|
||||
~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
C **= value;
|
||||
~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
enum E { }
|
||||
E **= value;
|
||||
~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
foo **= value;
|
||||
~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
// literals
|
||||
null **= value;
|
||||
~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
true **= value;
|
||||
~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
false **= value;
|
||||
~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
0 **= value;
|
||||
~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
'' **= value;
|
||||
~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
/d+/ **= value;
|
||||
~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
// object literals
|
||||
{ a: 0 } **= value;
|
||||
~~~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
|
||||
// array literals
|
||||
['', ''] **= value;
|
||||
~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
// super
|
||||
class Derived extends C {
|
||||
constructor() {
|
||||
super();
|
||||
super **= value;
|
||||
~~~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
}
|
||||
|
||||
foo() {
|
||||
super **= value;
|
||||
~~~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
}
|
||||
|
||||
static sfoo() {
|
||||
super **= value;
|
||||
~~~
|
||||
!!! error TS1034: 'super' must be followed by an argument list or member access.
|
||||
}
|
||||
}
|
||||
|
||||
// function expression
|
||||
function bar1() { } **= value;
|
||||
~~~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
() => { } **= value;
|
||||
~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
|
||||
// function calls
|
||||
foo() **= value;
|
||||
~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
||||
// parentheses, the containted expression is value
|
||||
(this) **= value;
|
||||
~~~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
(M) **= value;
|
||||
~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
(C) **= value;
|
||||
~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
(E) **= value;
|
||||
~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
(foo) **= value;
|
||||
~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
(null) **= value;
|
||||
~~~~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
(true) **= value;
|
||||
~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
(0) **= value;
|
||||
~~~
|
||||
!!! error TS2364: Invalid left-hand side of assignment expression.
|
||||
('') **= value;
|
||||
~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
(/d+/) **= value;
|
||||
~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
({}) **= value;
|
||||
~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
([]) **= value;
|
||||
~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
(function baz1() { }) **= value;
|
||||
~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
(foo()) **= value;
|
||||
~~~~~~~
|
||||
!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
@ -0,0 +1,177 @@
|
||||
//// [compoundExponentiationAssignmentLHSIsValue.ts]
|
||||
// expected error for all the LHS of compound assignments (arithmetic and addition)
|
||||
var value;
|
||||
|
||||
// this
|
||||
class C {
|
||||
constructor() {
|
||||
this **= value;
|
||||
}
|
||||
foo() {
|
||||
this **= value;
|
||||
}
|
||||
static sfoo() {
|
||||
this **= value;
|
||||
}
|
||||
}
|
||||
|
||||
function foo() {
|
||||
this **= value;
|
||||
}
|
||||
|
||||
this **= value;
|
||||
|
||||
// identifiers: module, class, enum, function
|
||||
module M { export var a; }
|
||||
M **= value;
|
||||
|
||||
C **= value;
|
||||
|
||||
enum E { }
|
||||
E **= value;
|
||||
|
||||
foo **= value;
|
||||
|
||||
// literals
|
||||
null **= value;
|
||||
true **= value;
|
||||
false **= value;
|
||||
0 **= value;
|
||||
'' **= value;
|
||||
/d+/ **= value;
|
||||
|
||||
// object literals
|
||||
{ a: 0 } **= value;
|
||||
|
||||
// array literals
|
||||
['', ''] **= value;
|
||||
|
||||
// super
|
||||
class Derived extends C {
|
||||
constructor() {
|
||||
super();
|
||||
super **= value;
|
||||
}
|
||||
|
||||
foo() {
|
||||
super **= value;
|
||||
}
|
||||
|
||||
static sfoo() {
|
||||
super **= value;
|
||||
}
|
||||
}
|
||||
|
||||
// function expression
|
||||
function bar1() { } **= value;
|
||||
() => { } **= value;
|
||||
|
||||
// function calls
|
||||
foo() **= value;
|
||||
|
||||
// parentheses, the containted expression is value
|
||||
(this) **= value;
|
||||
(M) **= value;
|
||||
(C) **= value;
|
||||
(E) **= value;
|
||||
(foo) **= value;
|
||||
(null) **= value;
|
||||
(true) **= value;
|
||||
(0) **= value;
|
||||
('') **= value;
|
||||
(/d+/) **= value;
|
||||
({}) **= value;
|
||||
([]) **= value;
|
||||
(function baz1() { }) **= value;
|
||||
(foo()) **= value;
|
||||
|
||||
//// [compoundExponentiationAssignmentLHSIsValue.js]
|
||||
var __extends = (this && this.__extends) || function (d, b) {
|
||||
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
// expected error for all the LHS of compound assignments (arithmetic and addition)
|
||||
var value;
|
||||
// this
|
||||
var C = (function () {
|
||||
function C() {
|
||||
this = Math.pow(this, value);
|
||||
}
|
||||
C.prototype.foo = function () {
|
||||
this = Math.pow(this, value);
|
||||
};
|
||||
C.sfoo = function () {
|
||||
this = Math.pow(this, value);
|
||||
};
|
||||
return C;
|
||||
})();
|
||||
function foo() {
|
||||
this = Math.pow(this, value);
|
||||
}
|
||||
this = Math.pow(this, value);
|
||||
// identifiers: module, class, enum, function
|
||||
var M;
|
||||
(function (M) {
|
||||
})(M || (M = {}));
|
||||
M = Math.pow(M, value);
|
||||
C = Math.pow(C, value);
|
||||
var E;
|
||||
(function (E) {
|
||||
})(E || (E = {}));
|
||||
E = Math.pow(E, value);
|
||||
foo = Math.pow(foo, value);
|
||||
// literals
|
||||
null = Math.pow(null, value);
|
||||
true = Math.pow(true, value);
|
||||
false = Math.pow(false, value);
|
||||
0 = Math.pow(0, value);
|
||||
'' = Math.pow('', value);
|
||||
/d+/ = Math.pow(/d+/, value);
|
||||
// object literals
|
||||
{
|
||||
a: 0;
|
||||
}
|
||||
value;
|
||||
// array literals
|
||||
['', ''] = Math.pow(['', ''], value);
|
||||
// super
|
||||
var Derived = (function (_super) {
|
||||
__extends(Derived, _super);
|
||||
function Derived() {
|
||||
_super.call(this);
|
||||
(_a = _super.prototype, _a. = Math.pow(_a., value));
|
||||
var _a;
|
||||
}
|
||||
Derived.prototype.foo = function () {
|
||||
(_a = _super.prototype, _a. = Math.pow(_a., value));
|
||||
var _a;
|
||||
};
|
||||
Derived.sfoo = function () {
|
||||
(_a = _super, _a. = Math.pow(_a., value));
|
||||
var _a;
|
||||
};
|
||||
return Derived;
|
||||
})(C);
|
||||
// function expression
|
||||
function bar1() { }
|
||||
value;
|
||||
(function () { });
|
||||
value;
|
||||
// function calls
|
||||
foo() = Math.pow(foo(), value);
|
||||
// parentheses, the containted expression is value
|
||||
(this) = Math.pow((this), value);
|
||||
(M) = Math.pow((M), value);
|
||||
(C) = Math.pow((C), value);
|
||||
(E) = Math.pow((E), value);
|
||||
(foo) = Math.pow((foo), value);
|
||||
(null) = Math.pow((null), value);
|
||||
(true) = Math.pow((true), value);
|
||||
(0) = Math.pow((0), value);
|
||||
('') = Math.pow((''), value);
|
||||
(/d+/) = Math.pow((/d+/), value);
|
||||
({}) = Math.pow(({}), value);
|
||||
([]) = Math.pow(([]), value);
|
||||
(function baz1() { }) = Math.pow((function baz1() { }), value);
|
||||
(foo()) = Math.pow((foo()), value);
|
||||
@ -1,11 +0,0 @@
|
||||
tests/cases/compiler/file1.ts(2,1): error TS2448: Block-scoped variable 'c' used before its declaration.
|
||||
|
||||
|
||||
==== tests/cases/compiler/file1.ts (1 errors) ====
|
||||
|
||||
c;
|
||||
~
|
||||
!!! error TS2448: Block-scoped variable 'c' used before its declaration.
|
||||
|
||||
==== tests/cases/compiler/file2.ts (0 errors) ====
|
||||
const c = 0;
|
||||
@ -0,0 +1,9 @@
|
||||
=== tests/cases/compiler/file1.ts ===
|
||||
|
||||
c;
|
||||
>c : Symbol(c, Decl(file2.ts, 0, 5))
|
||||
|
||||
=== tests/cases/compiler/file2.ts ===
|
||||
const c = 0;
|
||||
>c : Symbol(c, Decl(file2.ts, 0, 5))
|
||||
|
||||
@ -0,0 +1,10 @@
|
||||
=== tests/cases/compiler/file1.ts ===
|
||||
|
||||
c;
|
||||
>c : number
|
||||
|
||||
=== tests/cases/compiler/file2.ts ===
|
||||
const c = 0;
|
||||
>c : number
|
||||
>0 : number
|
||||
|
||||
22
tests/baselines/reference/decoratorCallGeneric.errors.txt
Normal file
22
tests/baselines/reference/decoratorCallGeneric.errors.txt
Normal file
@ -0,0 +1,22 @@
|
||||
tests/cases/conformance/decorators/decoratorCallGeneric.ts(7,2): error TS1238: Unable to resolve signature of class decorator when called as an expression.
|
||||
The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
Type argument candidate 'C' is not a valid type argument because it is not a supertype of candidate 'void'.
|
||||
|
||||
|
||||
==== tests/cases/conformance/decorators/decoratorCallGeneric.ts (1 errors) ====
|
||||
interface I<T> {
|
||||
prototype: T,
|
||||
m: () => T
|
||||
}
|
||||
function dec<T>(c: I<T>) { }
|
||||
|
||||
@dec
|
||||
~~~
|
||||
!!! error TS1238: Unable to resolve signature of class decorator when called as an expression.
|
||||
!!! error TS1238: The type argument for type parameter 'T' cannot be inferred from the usage. Consider specifying the type arguments explicitly.
|
||||
!!! error TS1238: Type argument candidate 'C' is not a valid type argument because it is not a supertype of candidate 'void'.
|
||||
class C {
|
||||
_brand: any;
|
||||
static m() {}
|
||||
}
|
||||
|
||||
31
tests/baselines/reference/decoratorCallGeneric.js
Normal file
31
tests/baselines/reference/decoratorCallGeneric.js
Normal file
@ -0,0 +1,31 @@
|
||||
//// [decoratorCallGeneric.ts]
|
||||
interface I<T> {
|
||||
prototype: T,
|
||||
m: () => T
|
||||
}
|
||||
function dec<T>(c: I<T>) { }
|
||||
|
||||
@dec
|
||||
class C {
|
||||
_brand: any;
|
||||
static m() {}
|
||||
}
|
||||
|
||||
|
||||
//// [decoratorCallGeneric.js]
|
||||
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
function dec(c) { }
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
C.m = function () { };
|
||||
C = __decorate([
|
||||
dec
|
||||
], C);
|
||||
return C;
|
||||
})();
|
||||
@ -36,15 +36,21 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(60,24): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(63,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(65,1): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(67,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(68,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(69,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(70,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(71,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(72,3): error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(67,7): error TS1005: ';' expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(67,9): error TS1109: Expression expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(68,7): error TS1005: ';' expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(68,9): error TS1109: Expression expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(69,7): error TS1005: ';' expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(69,9): error TS1109: Expression expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(70,10): error TS1005: ';' expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(70,12): error TS1109: Expression expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(71,10): error TS1005: ';' expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(71,12): error TS1109: Expression expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(72,10): error TS1005: ';' expected.
|
||||
tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts(72,12): error TS1109: Expression expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts (44 errors) ====
|
||||
==== tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOperatorWithAnyOtherTypeInvalidOperations.ts (50 errors) ====
|
||||
// -- operator on any type
|
||||
var ANY1;
|
||||
var ANY2: any[] = ["", ""];
|
||||
@ -188,20 +194,32 @@ tests/cases/conformance/expressions/unaryOperators/decrementOperator/decrementOp
|
||||
!!! error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type.
|
||||
|
||||
--ANY1--;
|
||||
~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
--ANY1++;
|
||||
~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
++ANY1--;
|
||||
~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
--ANY2[0]--;
|
||||
~~~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
--ANY2[0]++;
|
||||
~~~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
++ANY2[0]--;
|
||||
~~~~~~~~~
|
||||
!!! error TS2357: The operand of an increment or decrement operator must be a variable, property or indexer.
|
||||
~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~
|
||||
!!! error TS1109: Expression expected.
|
||||
@ -131,9 +131,15 @@ var ResultIsNumber30 = obj1.y--;
|
||||
// miss assignment operators
|
||||
--ANY2;
|
||||
ANY2--;
|
||||
--ANY1--;
|
||||
--ANY1++;
|
||||
++ANY1--;
|
||||
--ANY2[0]--;
|
||||
--ANY2[0]++;
|
||||
++ANY2[0]--;
|
||||
--ANY1;
|
||||
--;
|
||||
--ANY1;
|
||||
++;
|
||||
++ANY1;
|
||||
--;
|
||||
--ANY2[0];
|
||||
--;
|
||||
--ANY2[0];
|
||||
++;
|
||||
++ANY2[0];
|
||||
--;
|
||||
|
||||
@ -0,0 +1,32 @@
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts]
|
||||
|
||||
var array0 = [1, 2, 3]
|
||||
var i0 = 0;
|
||||
array0[++i0] **= 2;
|
||||
|
||||
var array1 = [1, 2, 3]
|
||||
var i1 = 0;
|
||||
array1[++i1] **= array1[++i1] **= 2;
|
||||
|
||||
var array2 = [1, 2, 3]
|
||||
var i2 = 0;
|
||||
array2[++i2] **= array2[++i2] ** 2;
|
||||
|
||||
var array3 = [2, 2, 3];
|
||||
var j0 = 0, j1 = 1;
|
||||
array3[j0++] **= array3[j1++] **= array3[j0++] **= 1;
|
||||
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS1.js]
|
||||
var array0 = [1, 2, 3];
|
||||
var i0 = 0;
|
||||
(_a = array0, _i = ++i0, _a[_i] = Math.pow(_a[_i], 2));
|
||||
var array1 = [1, 2, 3];
|
||||
var i1 = 0;
|
||||
(_b = array1, _c = ++i1, _b[_c] = Math.pow(_b[_c], (_d = array1, _e = ++i1, _d[_e] = Math.pow(_d[_e], 2))));
|
||||
var array2 = [1, 2, 3];
|
||||
var i2 = 0;
|
||||
(_f = array2, _g = ++i2, _f[_g] = Math.pow(_f[_g], Math.pow(array2[++i2], 2)));
|
||||
var array3 = [2, 2, 3];
|
||||
var j0 = 0, j1 = 1;
|
||||
(_h = array3, _j = j0++, _h[_j] = Math.pow(_h[_j], (_k = array3, _l = j1++, _k[_l] = Math.pow(_k[_l], (_m = array3, _o = j0++, _m[_o] = Math.pow(_m[_o], 1))))));
|
||||
var _a, _i, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
||||
@ -0,0 +1,51 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts ===
|
||||
|
||||
var array0 = [1, 2, 3]
|
||||
>array0 : Symbol(array0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 1, 3))
|
||||
|
||||
var i0 = 0;
|
||||
>i0 : Symbol(i0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 2, 3))
|
||||
|
||||
array0[++i0] **= 2;
|
||||
>array0 : Symbol(array0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 1, 3))
|
||||
>i0 : Symbol(i0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 2, 3))
|
||||
|
||||
var array1 = [1, 2, 3]
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 5, 3))
|
||||
|
||||
var i1 = 0;
|
||||
>i1 : Symbol(i1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 6, 3))
|
||||
|
||||
array1[++i1] **= array1[++i1] **= 2;
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 5, 3))
|
||||
>i1 : Symbol(i1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 6, 3))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 5, 3))
|
||||
>i1 : Symbol(i1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 6, 3))
|
||||
|
||||
var array2 = [1, 2, 3]
|
||||
>array2 : Symbol(array2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 9, 3))
|
||||
|
||||
var i2 = 0;
|
||||
>i2 : Symbol(i2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 10, 3))
|
||||
|
||||
array2[++i2] **= array2[++i2] ** 2;
|
||||
>array2 : Symbol(array2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 9, 3))
|
||||
>i2 : Symbol(i2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 10, 3))
|
||||
>array2 : Symbol(array2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 9, 3))
|
||||
>i2 : Symbol(i2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 10, 3))
|
||||
|
||||
var array3 = [2, 2, 3];
|
||||
>array3 : Symbol(array3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 13, 3))
|
||||
|
||||
var j0 = 0, j1 = 1;
|
||||
>j0 : Symbol(j0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 3))
|
||||
>j1 : Symbol(j1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 11))
|
||||
|
||||
array3[j0++] **= array3[j1++] **= array3[j0++] **= 1;
|
||||
>array3 : Symbol(array3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 13, 3))
|
||||
>j0 : Symbol(j0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 3))
|
||||
>array3 : Symbol(array3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 13, 3))
|
||||
>j1 : Symbol(j1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 11))
|
||||
>array3 : Symbol(array3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 13, 3))
|
||||
>j0 : Symbol(j0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts, 14, 3))
|
||||
|
||||
@ -0,0 +1,100 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS1.ts ===
|
||||
|
||||
var array0 = [1, 2, 3]
|
||||
>array0 : number[]
|
||||
>[1, 2, 3] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
var i0 = 0;
|
||||
>i0 : number
|
||||
>0 : number
|
||||
|
||||
array0[++i0] **= 2;
|
||||
>array0[++i0] **= 2 : number
|
||||
>array0[++i0] : number
|
||||
>array0 : number[]
|
||||
>++i0 : number
|
||||
>i0 : number
|
||||
>2 : number
|
||||
|
||||
var array1 = [1, 2, 3]
|
||||
>array1 : number[]
|
||||
>[1, 2, 3] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
var i1 = 0;
|
||||
>i1 : number
|
||||
>0 : number
|
||||
|
||||
array1[++i1] **= array1[++i1] **= 2;
|
||||
>array1[++i1] **= array1[++i1] **= 2 : number
|
||||
>array1[++i1] : number
|
||||
>array1 : number[]
|
||||
>++i1 : number
|
||||
>i1 : number
|
||||
>array1[++i1] **= 2 : number
|
||||
>array1[++i1] : number
|
||||
>array1 : number[]
|
||||
>++i1 : number
|
||||
>i1 : number
|
||||
>2 : number
|
||||
|
||||
var array2 = [1, 2, 3]
|
||||
>array2 : number[]
|
||||
>[1, 2, 3] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
var i2 = 0;
|
||||
>i2 : number
|
||||
>0 : number
|
||||
|
||||
array2[++i2] **= array2[++i2] ** 2;
|
||||
>array2[++i2] **= array2[++i2] ** 2 : number
|
||||
>array2[++i2] : number
|
||||
>array2 : number[]
|
||||
>++i2 : number
|
||||
>i2 : number
|
||||
>array2[++i2] ** 2 : number
|
||||
>array2[++i2] : number
|
||||
>array2 : number[]
|
||||
>++i2 : number
|
||||
>i2 : number
|
||||
>2 : number
|
||||
|
||||
var array3 = [2, 2, 3];
|
||||
>array3 : number[]
|
||||
>[2, 2, 3] : number[]
|
||||
>2 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
var j0 = 0, j1 = 1;
|
||||
>j0 : number
|
||||
>0 : number
|
||||
>j1 : number
|
||||
>1 : number
|
||||
|
||||
array3[j0++] **= array3[j1++] **= array3[j0++] **= 1;
|
||||
>array3[j0++] **= array3[j1++] **= array3[j0++] **= 1 : number
|
||||
>array3[j0++] : number
|
||||
>array3 : number[]
|
||||
>j0++ : number
|
||||
>j0 : number
|
||||
>array3[j1++] **= array3[j0++] **= 1 : number
|
||||
>array3[j1++] : number
|
||||
>array3 : number[]
|
||||
>j1++ : number
|
||||
>j1 : number
|
||||
>array3[j0++] **= 1 : number
|
||||
>array3[j0++] : number
|
||||
>array3 : number[]
|
||||
>j0++ : number
|
||||
>j0 : number
|
||||
>1 : number
|
||||
|
||||
@ -0,0 +1,26 @@
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts]
|
||||
var globalCounter = 0;
|
||||
function foo() {
|
||||
globalCounter += 1;
|
||||
return { 0: 2 };
|
||||
}
|
||||
foo()[0] **= foo()[0];
|
||||
var result_foo1 = foo()[0] **= foo()[0];
|
||||
foo()[0] **= foo()[0] **= 2;
|
||||
var result_foo2 = foo()[0] **= foo()[0] **= 2;
|
||||
foo()[0] **= foo()[0] ** 2;
|
||||
var result_foo3 = foo()[0] **= foo()[0] ** 2;
|
||||
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS2.js]
|
||||
var globalCounter = 0;
|
||||
function foo() {
|
||||
globalCounter += 1;
|
||||
return { 0: 2 };
|
||||
}
|
||||
(_a = foo(), _a[0] = Math.pow(_a[0], foo()[0]));
|
||||
var result_foo1 = (_b = foo(), _b[0] = Math.pow(_b[0], foo()[0]));
|
||||
(_c = foo(), _c[0] = Math.pow(_c[0], (_d = foo(), _d[0] = Math.pow(_d[0], 2))));
|
||||
var result_foo2 = (_e = foo(), _e[0] = Math.pow(_e[0], (_f = foo(), _f[0] = Math.pow(_f[0], 2))));
|
||||
(_g = foo(), _g[0] = Math.pow(_g[0], Math.pow(foo()[0], 2)));
|
||||
var result_foo3 = (_h = foo(), _h[0] = Math.pow(_h[0], Math.pow(foo()[0], 2)));
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
||||
@ -0,0 +1,51 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts ===
|
||||
var globalCounter = 0;
|
||||
>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 3))
|
||||
|
||||
function foo() {
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
|
||||
globalCounter += 1;
|
||||
>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 3))
|
||||
|
||||
return { 0: 2 };
|
||||
}
|
||||
foo()[0] **= foo()[0];
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
|
||||
var result_foo1 = foo()[0] **= foo()[0];
|
||||
>result_foo1 : Symbol(result_foo1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 6, 3))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
|
||||
foo()[0] **= foo()[0] **= 2;
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
|
||||
var result_foo2 = foo()[0] **= foo()[0] **= 2;
|
||||
>result_foo2 : Symbol(result_foo2, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 8, 3))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
|
||||
foo()[0] **= foo()[0] ** 2;
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
|
||||
var result_foo3 = foo()[0] **= foo()[0] ** 2;
|
||||
>result_foo3 : Symbol(result_foo3, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 10, 3))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 0, 22))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts, 3, 12))
|
||||
|
||||
@ -0,0 +1,94 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS2.ts ===
|
||||
var globalCounter = 0;
|
||||
>globalCounter : number
|
||||
>0 : number
|
||||
|
||||
function foo() {
|
||||
>foo : () => { 0: number; }
|
||||
|
||||
globalCounter += 1;
|
||||
>globalCounter += 1 : number
|
||||
>globalCounter : number
|
||||
>1 : number
|
||||
|
||||
return { 0: 2 };
|
||||
>{ 0: 2 } : { 0: number; }
|
||||
>2 : number
|
||||
}
|
||||
foo()[0] **= foo()[0];
|
||||
>foo()[0] **= foo()[0] : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
|
||||
var result_foo1 = foo()[0] **= foo()[0];
|
||||
>result_foo1 : number
|
||||
>foo()[0] **= foo()[0] : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
|
||||
foo()[0] **= foo()[0] **= 2;
|
||||
>foo()[0] **= foo()[0] **= 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>foo()[0] **= 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>2 : number
|
||||
|
||||
var result_foo2 = foo()[0] **= foo()[0] **= 2;
|
||||
>result_foo2 : number
|
||||
>foo()[0] **= foo()[0] **= 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>foo()[0] **= 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>2 : number
|
||||
|
||||
foo()[0] **= foo()[0] ** 2;
|
||||
>foo()[0] **= foo()[0] ** 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>foo()[0] ** 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>2 : number
|
||||
|
||||
var result_foo3 = foo()[0] **= foo()[0] ** 2;
|
||||
>result_foo3 : number
|
||||
>foo()[0] **= foo()[0] ** 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>foo()[0] ** 2 : number
|
||||
>foo()[0] : number
|
||||
>foo() : { 0: number; }
|
||||
>foo : () => { 0: number; }
|
||||
>0 : number
|
||||
>2 : number
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts]
|
||||
|
||||
var object = {
|
||||
_0: 2,
|
||||
get 0() {
|
||||
return this._0;
|
||||
},
|
||||
set 0(x: number) {
|
||||
this._0 = x;
|
||||
},
|
||||
}
|
||||
object[0] **= object[0];
|
||||
object[0] **= object[0] **= 2;
|
||||
object[0] **= object[0] ** 2;
|
||||
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS3.js]
|
||||
var object = {
|
||||
_0: 2,
|
||||
get 0() {
|
||||
return this._0;
|
||||
},
|
||||
set 0(x) {
|
||||
this._0 = x;
|
||||
},
|
||||
};
|
||||
(_a = object, _a[0] = Math.pow(_a[0], object[0]));
|
||||
(_b = object, _b[0] = Math.pow(_b[0], (_c = object, _c[0] = Math.pow(_c[0], 2))));
|
||||
(_d = object, _d[0] = Math.pow(_d[0], Math.pow(object[0], 2)));
|
||||
var _a, _b, _c, _d;
|
||||
@ -0,0 +1,37 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts ===
|
||||
|
||||
var object = {
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
|
||||
_0: 2,
|
||||
>_0 : Symbol(_0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 14))
|
||||
|
||||
get 0() {
|
||||
return this._0;
|
||||
},
|
||||
set 0(x: number) {
|
||||
>x : Symbol(x, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 6, 10))
|
||||
|
||||
this._0 = x;
|
||||
>x : Symbol(x, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 6, 10))
|
||||
|
||||
},
|
||||
}
|
||||
object[0] **= object[0];
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6))
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6))
|
||||
|
||||
object[0] **= object[0] **= 2;
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6))
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6))
|
||||
|
||||
object[0] **= object[0] ** 2;
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6))
|
||||
>object : Symbol(object, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 1, 3))
|
||||
>0 : Symbol(0, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 2, 10), Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts, 5, 6))
|
||||
|
||||
@ -0,0 +1,60 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS3.ts ===
|
||||
|
||||
var object = {
|
||||
>object : { 0: number; _0: number; }
|
||||
>{ _0: 2, get 0() { return this._0; }, set 0(x: number) { this._0 = x; },} : { 0: number; _0: number; }
|
||||
|
||||
_0: 2,
|
||||
>_0 : number
|
||||
>2 : number
|
||||
|
||||
get 0() {
|
||||
return this._0;
|
||||
>this._0 : any
|
||||
>this : any
|
||||
>_0 : any
|
||||
|
||||
},
|
||||
set 0(x: number) {
|
||||
>x : number
|
||||
|
||||
this._0 = x;
|
||||
>this._0 = x : number
|
||||
>this._0 : any
|
||||
>this : any
|
||||
>_0 : any
|
||||
>x : number
|
||||
|
||||
},
|
||||
}
|
||||
object[0] **= object[0];
|
||||
>object[0] **= object[0] : number
|
||||
>object[0] : number
|
||||
>object : { 0: number; _0: number; }
|
||||
>0 : number
|
||||
>object[0] : number
|
||||
>object : { 0: number; _0: number; }
|
||||
>0 : number
|
||||
|
||||
object[0] **= object[0] **= 2;
|
||||
>object[0] **= object[0] **= 2 : number
|
||||
>object[0] : number
|
||||
>object : { 0: number; _0: number; }
|
||||
>0 : number
|
||||
>object[0] **= 2 : number
|
||||
>object[0] : number
|
||||
>object : { 0: number; _0: number; }
|
||||
>0 : number
|
||||
>2 : number
|
||||
|
||||
object[0] **= object[0] ** 2;
|
||||
>object[0] **= object[0] ** 2 : number
|
||||
>object[0] : number
|
||||
>object : { 0: number; _0: number; }
|
||||
>0 : number
|
||||
>object[0] ** 2 : number
|
||||
>object[0] : number
|
||||
>object : { 0: number; _0: number; }
|
||||
>0 : number
|
||||
>2 : number
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts]
|
||||
|
||||
var globalCounter = 0;
|
||||
function incrementIdx(max: number) {
|
||||
globalCounter += 1;
|
||||
let idx = Math.floor(Math.random() * max);
|
||||
return idx;
|
||||
}
|
||||
|
||||
var array1 = [1, 2, 3, 4, 5];
|
||||
|
||||
array1[incrementIdx(array1.length)] **= 3;
|
||||
|
||||
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2;
|
||||
|
||||
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2;
|
||||
|
||||
//// [emitCompoundExponentiationAssignmentWithIndexingOnLHS4.js]
|
||||
var globalCounter = 0;
|
||||
function incrementIdx(max) {
|
||||
globalCounter += 1;
|
||||
var idx = Math.floor(Math.random() * max);
|
||||
return idx;
|
||||
}
|
||||
var array1 = [1, 2, 3, 4, 5];
|
||||
(_a = array1, _i = incrementIdx(array1.length), _a[_i] = Math.pow(_a[_i], 3));
|
||||
(_b = array1, _c = incrementIdx(array1.length), _b[_c] = Math.pow(_b[_c], (_d = array1, _e = incrementIdx(array1.length), _d[_e] = Math.pow(_d[_e], 2))));
|
||||
(_f = array1, _g = incrementIdx(array1.length), _f[_g] = Math.pow(_f[_g], Math.pow(array1[incrementIdx(array1.length)], 2)));
|
||||
var _a, _i, _b, _c, _d, _e, _f, _g;
|
||||
@ -0,0 +1,60 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts ===
|
||||
|
||||
var globalCounter = 0;
|
||||
>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 3))
|
||||
|
||||
function incrementIdx(max: number) {
|
||||
>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22))
|
||||
>max : Symbol(max, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 2, 22))
|
||||
|
||||
globalCounter += 1;
|
||||
>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 3))
|
||||
|
||||
let idx = Math.floor(Math.random() * max);
|
||||
>idx : Symbol(idx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 4, 7))
|
||||
>Math.floor : Symbol(Math.floor, Decl(lib.d.ts, --, --))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>floor : Symbol(Math.floor, Decl(lib.d.ts, --, --))
|
||||
>Math.random : Symbol(Math.random, Decl(lib.d.ts, --, --))
|
||||
>Math : Symbol(Math, Decl(lib.d.ts, --, --), Decl(lib.d.ts, --, --))
|
||||
>random : Symbol(Math.random, Decl(lib.d.ts, --, --))
|
||||
>max : Symbol(max, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 2, 22))
|
||||
|
||||
return idx;
|
||||
>idx : Symbol(idx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 4, 7))
|
||||
}
|
||||
|
||||
var array1 = [1, 2, 3, 4, 5];
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
|
||||
array1[incrementIdx(array1.length)] **= 3;
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22))
|
||||
>array1.length : Symbol(Array.length, Decl(lib.d.ts, --, --))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>length : Symbol(Array.length, Decl(lib.d.ts, --, --))
|
||||
|
||||
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2;
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22))
|
||||
>array1.length : Symbol(Array.length, Decl(lib.d.ts, --, --))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>length : Symbol(Array.length, Decl(lib.d.ts, --, --))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22))
|
||||
>array1.length : Symbol(Array.length, Decl(lib.d.ts, --, --))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>length : Symbol(Array.length, Decl(lib.d.ts, --, --))
|
||||
|
||||
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2;
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22))
|
||||
>array1.length : Symbol(Array.length, Decl(lib.d.ts, --, --))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>length : Symbol(Array.length, Decl(lib.d.ts, --, --))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>incrementIdx : Symbol(incrementIdx, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 1, 22))
|
||||
>array1.length : Symbol(Array.length, Decl(lib.d.ts, --, --))
|
||||
>array1 : Symbol(array1, Decl(emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts, 8, 3))
|
||||
>length : Symbol(Array.length, Decl(lib.d.ts, --, --))
|
||||
|
||||
@ -0,0 +1,90 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithIndexingOnLHS4.ts ===
|
||||
|
||||
var globalCounter = 0;
|
||||
>globalCounter : number
|
||||
>0 : number
|
||||
|
||||
function incrementIdx(max: number) {
|
||||
>incrementIdx : (max: number) => number
|
||||
>max : number
|
||||
|
||||
globalCounter += 1;
|
||||
>globalCounter += 1 : number
|
||||
>globalCounter : number
|
||||
>1 : number
|
||||
|
||||
let idx = Math.floor(Math.random() * max);
|
||||
>idx : number
|
||||
>Math.floor(Math.random() * max) : number
|
||||
>Math.floor : (x: number) => number
|
||||
>Math : Math
|
||||
>floor : (x: number) => number
|
||||
>Math.random() * max : number
|
||||
>Math.random() : number
|
||||
>Math.random : () => number
|
||||
>Math : Math
|
||||
>random : () => number
|
||||
>max : number
|
||||
|
||||
return idx;
|
||||
>idx : number
|
||||
}
|
||||
|
||||
var array1 = [1, 2, 3, 4, 5];
|
||||
>array1 : number[]
|
||||
>[1, 2, 3, 4, 5] : number[]
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
>4 : number
|
||||
>5 : number
|
||||
|
||||
array1[incrementIdx(array1.length)] **= 3;
|
||||
>array1[incrementIdx(array1.length)] **= 3 : number
|
||||
>array1[incrementIdx(array1.length)] : number
|
||||
>array1 : number[]
|
||||
>incrementIdx(array1.length) : number
|
||||
>incrementIdx : (max: number) => number
|
||||
>array1.length : number
|
||||
>array1 : number[]
|
||||
>length : number
|
||||
>3 : number
|
||||
|
||||
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2;
|
||||
>array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] **= 2 : number
|
||||
>array1[incrementIdx(array1.length)] : number
|
||||
>array1 : number[]
|
||||
>incrementIdx(array1.length) : number
|
||||
>incrementIdx : (max: number) => number
|
||||
>array1.length : number
|
||||
>array1 : number[]
|
||||
>length : number
|
||||
>array1[incrementIdx(array1.length)] **= 2 : number
|
||||
>array1[incrementIdx(array1.length)] : number
|
||||
>array1 : number[]
|
||||
>incrementIdx(array1.length) : number
|
||||
>incrementIdx : (max: number) => number
|
||||
>array1.length : number
|
||||
>array1 : number[]
|
||||
>length : number
|
||||
>2 : number
|
||||
|
||||
array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2;
|
||||
>array1[incrementIdx(array1.length)] **= array1[incrementIdx(array1.length)] ** 2 : number
|
||||
>array1[incrementIdx(array1.length)] : number
|
||||
>array1 : number[]
|
||||
>incrementIdx(array1.length) : number
|
||||
>incrementIdx : (max: number) => number
|
||||
>array1.length : number
|
||||
>array1 : number[]
|
||||
>length : number
|
||||
>array1[incrementIdx(array1.length)] ** 2 : number
|
||||
>array1[incrementIdx(array1.length)] : number
|
||||
>array1 : number[]
|
||||
>incrementIdx(array1.length) : number
|
||||
>incrementIdx : (max: number) => number
|
||||
>array1.length : number
|
||||
>array1 : number[]
|
||||
>length : number
|
||||
>2 : number
|
||||
|
||||
@ -0,0 +1,27 @@
|
||||
//// [emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts]
|
||||
|
||||
var globalCounter = 0;
|
||||
function foo() {
|
||||
globalCounter += 1;
|
||||
return { prop: 2 };
|
||||
}
|
||||
foo().prop **= 2;
|
||||
var result0 = foo().prop **= 2;
|
||||
foo().prop **= foo().prop **= 2;
|
||||
var result1 = foo().prop **= foo().prop **= 2;
|
||||
foo().prop **= foo().prop ** 2;
|
||||
var result2 = foo().prop **= foo().prop ** 2;
|
||||
|
||||
//// [emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.js]
|
||||
var globalCounter = 0;
|
||||
function foo() {
|
||||
globalCounter += 1;
|
||||
return { prop: 2 };
|
||||
}
|
||||
(_a = foo(), _a.prop = Math.pow(_a.prop, 2));
|
||||
var result0 = (_b = foo(), _b.prop = Math.pow(_b.prop, 2));
|
||||
(_c = foo(), _c.prop = Math.pow(_c.prop, (_d = foo(), _d.prop = Math.pow(_d.prop, 2))));
|
||||
var result1 = (_e = foo(), _e.prop = Math.pow(_e.prop, (_f = foo(), _f.prop = Math.pow(_f.prop, 2))));
|
||||
(_g = foo(), _g.prop = Math.pow(_g.prop, Math.pow(foo().prop, 2)));
|
||||
var result2 = (_h = foo(), _h.prop = Math.pow(_h.prop, Math.pow(foo().prop, 2)));
|
||||
var _a, _b, _c, _d, _e, _f, _g, _h;
|
||||
@ -0,0 +1,59 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts ===
|
||||
|
||||
var globalCounter = 0;
|
||||
>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 3))
|
||||
|
||||
function foo() {
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
|
||||
globalCounter += 1;
|
||||
>globalCounter : Symbol(globalCounter, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 3))
|
||||
|
||||
return { prop: 2 };
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
}
|
||||
foo().prop **= 2;
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
|
||||
var result0 = foo().prop **= 2;
|
||||
>result0 : Symbol(result0, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 7, 3))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
|
||||
foo().prop **= foo().prop **= 2;
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
|
||||
var result1 = foo().prop **= foo().prop **= 2;
|
||||
>result1 : Symbol(result1, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 9, 3))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
|
||||
foo().prop **= foo().prop ** 2;
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
|
||||
var result2 = foo().prop **= foo().prop ** 2;
|
||||
>result2 : Symbol(result2, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 11, 3))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo().prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
>foo : Symbol(foo, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 1, 22))
|
||||
>prop : Symbol(prop, Decl(emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts, 4, 12))
|
||||
|
||||
@ -0,0 +1,90 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationAssignmentWithPropertyAccessingOnLHS1.ts ===
|
||||
|
||||
var globalCounter = 0;
|
||||
>globalCounter : number
|
||||
>0 : number
|
||||
|
||||
function foo() {
|
||||
>foo : () => { prop: number; }
|
||||
|
||||
globalCounter += 1;
|
||||
>globalCounter += 1 : number
|
||||
>globalCounter : number
|
||||
>1 : number
|
||||
|
||||
return { prop: 2 };
|
||||
>{ prop: 2 } : { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
}
|
||||
foo().prop **= 2;
|
||||
>foo().prop **= 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
|
||||
var result0 = foo().prop **= 2;
|
||||
>result0 : number
|
||||
>foo().prop **= 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
|
||||
foo().prop **= foo().prop **= 2;
|
||||
>foo().prop **= foo().prop **= 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>foo().prop **= 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
|
||||
var result1 = foo().prop **= foo().prop **= 2;
|
||||
>result1 : number
|
||||
>foo().prop **= foo().prop **= 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>foo().prop **= 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
|
||||
foo().prop **= foo().prop ** 2;
|
||||
>foo().prop **= foo().prop ** 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>foo().prop ** 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
|
||||
var result2 = foo().prop **= foo().prop ** 2;
|
||||
>result2 : number
|
||||
>foo().prop **= foo().prop ** 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>foo().prop ** 2 : number
|
||||
>foo().prop : number
|
||||
>foo() : { prop: number; }
|
||||
>foo : () => { prop: number; }
|
||||
>prop : number
|
||||
>2 : number
|
||||
|
||||
@ -0,0 +1,43 @@
|
||||
//// [emitCompoundExponentiationOperator1.ts]
|
||||
|
||||
var comp: number;
|
||||
|
||||
comp **= 1;
|
||||
comp **= comp ** comp;
|
||||
comp **= comp ** comp ** 2;
|
||||
comp **= comp ** comp + 2;
|
||||
comp **= comp ** comp - 2;
|
||||
comp **= comp ** comp * 2;
|
||||
comp **= comp ** comp / 2;
|
||||
comp **= comp ** comp % 2;
|
||||
comp **= (comp - 2) ** 5;
|
||||
comp **= (comp + 2) ** 5;
|
||||
comp **= (comp * 2) ** 5;
|
||||
comp **= (comp / 2) ** 5;
|
||||
comp **= (comp % 2) ** 5;
|
||||
comp **= comp ** (5 + 2);
|
||||
comp **= comp ** (5 - 2);
|
||||
comp **= comp ** (5 * 2);
|
||||
comp **= comp ** (5 / 2);
|
||||
comp **= comp ** (5 % 2);
|
||||
|
||||
//// [emitCompoundExponentiationOperator1.js]
|
||||
var comp;
|
||||
comp = Math.pow(comp, 1);
|
||||
comp = Math.pow(comp, Math.pow(comp, comp));
|
||||
comp = Math.pow(comp, Math.pow(comp, Math.pow(comp, 2)));
|
||||
comp = Math.pow(comp, Math.pow(comp, comp) + 2);
|
||||
comp = Math.pow(comp, Math.pow(comp, comp) - 2);
|
||||
comp = Math.pow(comp, Math.pow(comp, comp) * 2);
|
||||
comp = Math.pow(comp, Math.pow(comp, comp) / 2);
|
||||
comp = Math.pow(comp, Math.pow(comp, comp) % 2);
|
||||
comp = Math.pow(comp, Math.pow((comp - 2), 5));
|
||||
comp = Math.pow(comp, Math.pow((comp + 2), 5));
|
||||
comp = Math.pow(comp, Math.pow((comp * 2), 5));
|
||||
comp = Math.pow(comp, Math.pow((comp / 2), 5));
|
||||
comp = Math.pow(comp, Math.pow((comp % 2), 5));
|
||||
comp = Math.pow(comp, Math.pow(comp, (5 + 2)));
|
||||
comp = Math.pow(comp, Math.pow(comp, (5 - 2)));
|
||||
comp = Math.pow(comp, Math.pow(comp, (5 * 2)));
|
||||
comp = Math.pow(comp, Math.pow(comp, (5 / 2)));
|
||||
comp = Math.pow(comp, Math.pow(comp, (5 % 2)));
|
||||
@ -0,0 +1,83 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1.ts ===
|
||||
|
||||
var comp: number;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= 1;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= comp ** comp;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= comp ** comp ** 2;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= comp ** comp + 2;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= comp ** comp - 2;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= comp ** comp * 2;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= comp ** comp / 2;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= comp ** comp % 2;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= (comp - 2) ** 5;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= (comp + 2) ** 5;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= (comp * 2) ** 5;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= (comp / 2) ** 5;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= (comp % 2) ** 5;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= comp ** (5 + 2);
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= comp ** (5 - 2);
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= comp ** (5 * 2);
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= comp ** (5 / 2);
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
comp **= comp ** (5 % 2);
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator1.ts, 1, 3))
|
||||
|
||||
@ -0,0 +1,171 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator1.ts ===
|
||||
|
||||
var comp: number;
|
||||
>comp : number
|
||||
|
||||
comp **= 1;
|
||||
>comp **= 1 : number
|
||||
>comp : number
|
||||
>1 : number
|
||||
|
||||
comp **= comp ** comp;
|
||||
>comp **= comp ** comp : number
|
||||
>comp : number
|
||||
>comp ** comp : number
|
||||
>comp : number
|
||||
>comp : number
|
||||
|
||||
comp **= comp ** comp ** 2;
|
||||
>comp **= comp ** comp ** 2 : number
|
||||
>comp : number
|
||||
>comp ** comp ** 2 : number
|
||||
>comp : number
|
||||
>comp ** 2 : number
|
||||
>comp : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp ** comp + 2;
|
||||
>comp **= comp ** comp + 2 : number
|
||||
>comp : number
|
||||
>comp ** comp + 2 : number
|
||||
>comp ** comp : number
|
||||
>comp : number
|
||||
>comp : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp ** comp - 2;
|
||||
>comp **= comp ** comp - 2 : number
|
||||
>comp : number
|
||||
>comp ** comp - 2 : number
|
||||
>comp ** comp : number
|
||||
>comp : number
|
||||
>comp : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp ** comp * 2;
|
||||
>comp **= comp ** comp * 2 : number
|
||||
>comp : number
|
||||
>comp ** comp * 2 : number
|
||||
>comp ** comp : number
|
||||
>comp : number
|
||||
>comp : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp ** comp / 2;
|
||||
>comp **= comp ** comp / 2 : number
|
||||
>comp : number
|
||||
>comp ** comp / 2 : number
|
||||
>comp ** comp : number
|
||||
>comp : number
|
||||
>comp : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp ** comp % 2;
|
||||
>comp **= comp ** comp % 2 : number
|
||||
>comp : number
|
||||
>comp ** comp % 2 : number
|
||||
>comp ** comp : number
|
||||
>comp : number
|
||||
>comp : number
|
||||
>2 : number
|
||||
|
||||
comp **= (comp - 2) ** 5;
|
||||
>comp **= (comp - 2) ** 5 : number
|
||||
>comp : number
|
||||
>(comp - 2) ** 5 : number
|
||||
>(comp - 2) : number
|
||||
>comp - 2 : number
|
||||
>comp : number
|
||||
>2 : number
|
||||
>5 : number
|
||||
|
||||
comp **= (comp + 2) ** 5;
|
||||
>comp **= (comp + 2) ** 5 : number
|
||||
>comp : number
|
||||
>(comp + 2) ** 5 : number
|
||||
>(comp + 2) : number
|
||||
>comp + 2 : number
|
||||
>comp : number
|
||||
>2 : number
|
||||
>5 : number
|
||||
|
||||
comp **= (comp * 2) ** 5;
|
||||
>comp **= (comp * 2) ** 5 : number
|
||||
>comp : number
|
||||
>(comp * 2) ** 5 : number
|
||||
>(comp * 2) : number
|
||||
>comp * 2 : number
|
||||
>comp : number
|
||||
>2 : number
|
||||
>5 : number
|
||||
|
||||
comp **= (comp / 2) ** 5;
|
||||
>comp **= (comp / 2) ** 5 : number
|
||||
>comp : number
|
||||
>(comp / 2) ** 5 : number
|
||||
>(comp / 2) : number
|
||||
>comp / 2 : number
|
||||
>comp : number
|
||||
>2 : number
|
||||
>5 : number
|
||||
|
||||
comp **= (comp % 2) ** 5;
|
||||
>comp **= (comp % 2) ** 5 : number
|
||||
>comp : number
|
||||
>(comp % 2) ** 5 : number
|
||||
>(comp % 2) : number
|
||||
>comp % 2 : number
|
||||
>comp : number
|
||||
>2 : number
|
||||
>5 : number
|
||||
|
||||
comp **= comp ** (5 + 2);
|
||||
>comp **= comp ** (5 + 2) : number
|
||||
>comp : number
|
||||
>comp ** (5 + 2) : number
|
||||
>comp : number
|
||||
>(5 + 2) : number
|
||||
>5 + 2 : number
|
||||
>5 : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp ** (5 - 2);
|
||||
>comp **= comp ** (5 - 2) : number
|
||||
>comp : number
|
||||
>comp ** (5 - 2) : number
|
||||
>comp : number
|
||||
>(5 - 2) : number
|
||||
>5 - 2 : number
|
||||
>5 : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp ** (5 * 2);
|
||||
>comp **= comp ** (5 * 2) : number
|
||||
>comp : number
|
||||
>comp ** (5 * 2) : number
|
||||
>comp : number
|
||||
>(5 * 2) : number
|
||||
>5 * 2 : number
|
||||
>5 : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp ** (5 / 2);
|
||||
>comp **= comp ** (5 / 2) : number
|
||||
>comp : number
|
||||
>comp ** (5 / 2) : number
|
||||
>comp : number
|
||||
>(5 / 2) : number
|
||||
>5 / 2 : number
|
||||
>5 : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp ** (5 % 2);
|
||||
>comp **= comp ** (5 % 2) : number
|
||||
>comp : number
|
||||
>comp ** (5 % 2) : number
|
||||
>comp : number
|
||||
>(5 % 2) : number
|
||||
>5 % 2 : number
|
||||
>5 : number
|
||||
>2 : number
|
||||
|
||||
@ -0,0 +1,47 @@
|
||||
//// [emitCompoundExponentiationOperator2.ts]
|
||||
|
||||
var comp: number;
|
||||
|
||||
comp **= 1;
|
||||
comp **= comp **= 1;
|
||||
comp **= comp **= 1 + 2;
|
||||
comp **= comp **= 1 - 2;
|
||||
comp **= comp **= 1 * 2;
|
||||
comp **= comp **= 1 / 2;
|
||||
|
||||
comp **= comp **= (1 + 2);
|
||||
comp **= comp **= (1 - 2);
|
||||
comp **= comp **= (1 * 2);
|
||||
comp **= comp **= (1 / 2);
|
||||
|
||||
comp **= comp **= 1 + 2 ** 3;
|
||||
comp **= comp **= 1 - 2 ** 4;
|
||||
comp **= comp **= 1 * 2 ** 5;
|
||||
comp **= comp **= 1 / 2 ** 6;
|
||||
|
||||
comp **= comp **= (1 + 2) ** 3;
|
||||
comp **= comp **= (1 - 2) ** 4;
|
||||
comp **= comp **= (1 * 2) ** 5;
|
||||
comp **= comp **= (1 / 2) ** 6;
|
||||
|
||||
|
||||
//// [emitCompoundExponentiationOperator2.js]
|
||||
var comp;
|
||||
comp = Math.pow(comp, 1);
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, 1));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, 1 + 2));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, 1 - 2));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, 1 * 2));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, 1 / 2));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, (1 + 2)));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, (1 - 2)));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, (1 * 2)));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, (1 / 2)));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, 1 + Math.pow(2, 3)));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, 1 - Math.pow(2, 4)));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, 1 * Math.pow(2, 5)));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, 1 / Math.pow(2, 6)));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, Math.pow((1 + 2), 3)));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, Math.pow((1 - 2), 4)));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, Math.pow((1 * 2), 5)));
|
||||
comp = Math.pow(comp, comp = Math.pow(comp, Math.pow((1 / 2), 6)));
|
||||
@ -0,0 +1,76 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2.ts ===
|
||||
|
||||
var comp: number;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= 1;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= 1;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= 1 + 2;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= 1 - 2;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= 1 * 2;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= 1 / 2;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= (1 + 2);
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= (1 - 2);
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= (1 * 2);
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= (1 / 2);
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= 1 + 2 ** 3;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= 1 - 2 ** 4;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= 1 * 2 ** 5;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= 1 / 2 ** 6;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= (1 + 2) ** 3;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= (1 - 2) ** 4;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= (1 * 2) ** 5;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
comp **= comp **= (1 / 2) ** 6;
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
>comp : Symbol(comp, Decl(emitCompoundExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
@ -0,0 +1,185 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitCompoundExponentiationOperator2.ts ===
|
||||
|
||||
var comp: number;
|
||||
>comp : number
|
||||
|
||||
comp **= 1;
|
||||
>comp **= 1 : number
|
||||
>comp : number
|
||||
>1 : number
|
||||
|
||||
comp **= comp **= 1;
|
||||
>comp **= comp **= 1 : number
|
||||
>comp : number
|
||||
>comp **= 1 : number
|
||||
>comp : number
|
||||
>1 : number
|
||||
|
||||
comp **= comp **= 1 + 2;
|
||||
>comp **= comp **= 1 + 2 : number
|
||||
>comp : number
|
||||
>comp **= 1 + 2 : number
|
||||
>comp : number
|
||||
>1 + 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp **= 1 - 2;
|
||||
>comp **= comp **= 1 - 2 : number
|
||||
>comp : number
|
||||
>comp **= 1 - 2 : number
|
||||
>comp : number
|
||||
>1 - 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp **= 1 * 2;
|
||||
>comp **= comp **= 1 * 2 : number
|
||||
>comp : number
|
||||
>comp **= 1 * 2 : number
|
||||
>comp : number
|
||||
>1 * 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp **= 1 / 2;
|
||||
>comp **= comp **= 1 / 2 : number
|
||||
>comp : number
|
||||
>comp **= 1 / 2 : number
|
||||
>comp : number
|
||||
>1 / 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp **= (1 + 2);
|
||||
>comp **= comp **= (1 + 2) : number
|
||||
>comp : number
|
||||
>comp **= (1 + 2) : number
|
||||
>comp : number
|
||||
>(1 + 2) : number
|
||||
>1 + 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp **= (1 - 2);
|
||||
>comp **= comp **= (1 - 2) : number
|
||||
>comp : number
|
||||
>comp **= (1 - 2) : number
|
||||
>comp : number
|
||||
>(1 - 2) : number
|
||||
>1 - 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp **= (1 * 2);
|
||||
>comp **= comp **= (1 * 2) : number
|
||||
>comp : number
|
||||
>comp **= (1 * 2) : number
|
||||
>comp : number
|
||||
>(1 * 2) : number
|
||||
>1 * 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp **= (1 / 2);
|
||||
>comp **= comp **= (1 / 2) : number
|
||||
>comp : number
|
||||
>comp **= (1 / 2) : number
|
||||
>comp : number
|
||||
>(1 / 2) : number
|
||||
>1 / 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
comp **= comp **= 1 + 2 ** 3;
|
||||
>comp **= comp **= 1 + 2 ** 3 : number
|
||||
>comp : number
|
||||
>comp **= 1 + 2 ** 3 : number
|
||||
>comp : number
|
||||
>1 + 2 ** 3 : number
|
||||
>1 : number
|
||||
>2 ** 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
comp **= comp **= 1 - 2 ** 4;
|
||||
>comp **= comp **= 1 - 2 ** 4 : number
|
||||
>comp : number
|
||||
>comp **= 1 - 2 ** 4 : number
|
||||
>comp : number
|
||||
>1 - 2 ** 4 : number
|
||||
>1 : number
|
||||
>2 ** 4 : number
|
||||
>2 : number
|
||||
>4 : number
|
||||
|
||||
comp **= comp **= 1 * 2 ** 5;
|
||||
>comp **= comp **= 1 * 2 ** 5 : number
|
||||
>comp : number
|
||||
>comp **= 1 * 2 ** 5 : number
|
||||
>comp : number
|
||||
>1 * 2 ** 5 : number
|
||||
>1 : number
|
||||
>2 ** 5 : number
|
||||
>2 : number
|
||||
>5 : number
|
||||
|
||||
comp **= comp **= 1 / 2 ** 6;
|
||||
>comp **= comp **= 1 / 2 ** 6 : number
|
||||
>comp : number
|
||||
>comp **= 1 / 2 ** 6 : number
|
||||
>comp : number
|
||||
>1 / 2 ** 6 : number
|
||||
>1 : number
|
||||
>2 ** 6 : number
|
||||
>2 : number
|
||||
>6 : number
|
||||
|
||||
comp **= comp **= (1 + 2) ** 3;
|
||||
>comp **= comp **= (1 + 2) ** 3 : number
|
||||
>comp : number
|
||||
>comp **= (1 + 2) ** 3 : number
|
||||
>comp : number
|
||||
>(1 + 2) ** 3 : number
|
||||
>(1 + 2) : number
|
||||
>1 + 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
comp **= comp **= (1 - 2) ** 4;
|
||||
>comp **= comp **= (1 - 2) ** 4 : number
|
||||
>comp : number
|
||||
>comp **= (1 - 2) ** 4 : number
|
||||
>comp : number
|
||||
>(1 - 2) ** 4 : number
|
||||
>(1 - 2) : number
|
||||
>1 - 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
>4 : number
|
||||
|
||||
comp **= comp **= (1 * 2) ** 5;
|
||||
>comp **= comp **= (1 * 2) ** 5 : number
|
||||
>comp : number
|
||||
>comp **= (1 * 2) ** 5 : number
|
||||
>comp : number
|
||||
>(1 * 2) ** 5 : number
|
||||
>(1 * 2) : number
|
||||
>1 * 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
>5 : number
|
||||
|
||||
comp **= comp **= (1 / 2) ** 6;
|
||||
>comp **= comp **= (1 / 2) ** 6 : number
|
||||
>comp : number
|
||||
>comp **= (1 / 2) ** 6 : number
|
||||
>comp : number
|
||||
>(1 / 2) ** 6 : number
|
||||
>(1 / 2) : number
|
||||
>1 / 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
>6 : number
|
||||
|
||||
62
tests/baselines/reference/emitExponentiationOperator1.js
Normal file
62
tests/baselines/reference/emitExponentiationOperator1.js
Normal file
@ -0,0 +1,62 @@
|
||||
//// [emitExponentiationOperator1.ts]
|
||||
|
||||
1 ** -2;
|
||||
1 ** 2;
|
||||
(-1) ** 2
|
||||
1 ** 2 ** 3;
|
||||
1 ** 2 ** -3;
|
||||
1 ** -(2 ** 3);
|
||||
(-(1 ** 2)) ** 3;
|
||||
(-(1 ** 2)) ** -3;
|
||||
|
||||
1 ** 2 + 3;
|
||||
1 ** 2 - 3;
|
||||
1 ** 2 * 3;
|
||||
1 ** 2 / 3;
|
||||
1 ** 2 % 3;
|
||||
|
||||
1 ** -2 + 3;
|
||||
1 ** -2 - 3;
|
||||
1 ** -2 * 3;
|
||||
1 ** -2 / 3;
|
||||
1 ** -2 % 3;
|
||||
|
||||
2 + 3 ** 3;
|
||||
2 - 3 ** 3;
|
||||
2 * 3 ** 3;
|
||||
2 / 3 ** 3;
|
||||
2 % 3 ** 3;
|
||||
|
||||
(2 + 3) ** 4;
|
||||
(2 - 3) ** 4;
|
||||
(2 * 3) ** 4;
|
||||
(2 / 3) ** 4;
|
||||
|
||||
//// [emitExponentiationOperator1.js]
|
||||
Math.pow(1, -2);
|
||||
Math.pow(1, 2);
|
||||
Math.pow((-1), 2);
|
||||
Math.pow(1, Math.pow(2, 3));
|
||||
Math.pow(1, Math.pow(2, -3));
|
||||
Math.pow(1, -(Math.pow(2, 3)));
|
||||
Math.pow((-(Math.pow(1, 2))), 3);
|
||||
Math.pow((-(Math.pow(1, 2))), -3);
|
||||
Math.pow(1, 2) + 3;
|
||||
Math.pow(1, 2) - 3;
|
||||
Math.pow(1, 2) * 3;
|
||||
Math.pow(1, 2) / 3;
|
||||
Math.pow(1, 2) % 3;
|
||||
Math.pow(1, -2) + 3;
|
||||
Math.pow(1, -2) - 3;
|
||||
Math.pow(1, -2) * 3;
|
||||
Math.pow(1, -2) / 3;
|
||||
Math.pow(1, -2) % 3;
|
||||
2 + Math.pow(3, 3);
|
||||
2 - Math.pow(3, 3);
|
||||
2 * Math.pow(3, 3);
|
||||
2 / Math.pow(3, 3);
|
||||
2 % Math.pow(3, 3);
|
||||
Math.pow((2 + 3), 4);
|
||||
Math.pow((2 - 3), 4);
|
||||
Math.pow((2 * 3), 4);
|
||||
Math.pow((2 / 3), 4);
|
||||
@ -0,0 +1,34 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts ===
|
||||
|
||||
No type information for this code.1 ** -2;
|
||||
No type information for this code.1 ** 2;
|
||||
No type information for this code.(-1) ** 2
|
||||
No type information for this code.1 ** 2 ** 3;
|
||||
No type information for this code.1 ** 2 ** -3;
|
||||
No type information for this code.1 ** -(2 ** 3);
|
||||
No type information for this code.(-(1 ** 2)) ** 3;
|
||||
No type information for this code.(-(1 ** 2)) ** -3;
|
||||
No type information for this code.
|
||||
No type information for this code.1 ** 2 + 3;
|
||||
No type information for this code.1 ** 2 - 3;
|
||||
No type information for this code.1 ** 2 * 3;
|
||||
No type information for this code.1 ** 2 / 3;
|
||||
No type information for this code.1 ** 2 % 3;
|
||||
No type information for this code.
|
||||
No type information for this code.1 ** -2 + 3;
|
||||
No type information for this code.1 ** -2 - 3;
|
||||
No type information for this code.1 ** -2 * 3;
|
||||
No type information for this code.1 ** -2 / 3;
|
||||
No type information for this code.1 ** -2 % 3;
|
||||
No type information for this code.
|
||||
No type information for this code.2 + 3 ** 3;
|
||||
No type information for this code.2 - 3 ** 3;
|
||||
No type information for this code.2 * 3 ** 3;
|
||||
No type information for this code.2 / 3 ** 3;
|
||||
No type information for this code.2 % 3 ** 3;
|
||||
No type information for this code.
|
||||
No type information for this code.(2 + 3) ** 4;
|
||||
No type information for this code.(2 - 3) ** 4;
|
||||
No type information for this code.(2 * 3) ** 4;
|
||||
No type information for this code.(2 / 3) ** 4;
|
||||
No type information for this code.
|
||||
207
tests/baselines/reference/emitExponentiationOperator1.types
Normal file
207
tests/baselines/reference/emitExponentiationOperator1.types
Normal file
@ -0,0 +1,207 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator1.ts ===
|
||||
|
||||
1 ** -2;
|
||||
>1 ** -2 : number
|
||||
>1 : number
|
||||
>-2 : number
|
||||
>2 : number
|
||||
|
||||
1 ** 2;
|
||||
>1 ** 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
(-1) ** 2
|
||||
>(-1) ** 2 : number
|
||||
>(-1) : number
|
||||
>-1 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
|
||||
1 ** 2 ** 3;
|
||||
>1 ** 2 ** 3 : number
|
||||
>1 : number
|
||||
>2 ** 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
1 ** 2 ** -3;
|
||||
>1 ** 2 ** -3 : number
|
||||
>1 : number
|
||||
>2 ** -3 : number
|
||||
>2 : number
|
||||
>-3 : number
|
||||
>3 : number
|
||||
|
||||
1 ** -(2 ** 3);
|
||||
>1 ** -(2 ** 3) : number
|
||||
>1 : number
|
||||
>-(2 ** 3) : number
|
||||
>(2 ** 3) : number
|
||||
>2 ** 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
(-(1 ** 2)) ** 3;
|
||||
>(-(1 ** 2)) ** 3 : number
|
||||
>(-(1 ** 2)) : number
|
||||
>-(1 ** 2) : number
|
||||
>(1 ** 2) : number
|
||||
>1 ** 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
(-(1 ** 2)) ** -3;
|
||||
>(-(1 ** 2)) ** -3 : number
|
||||
>(-(1 ** 2)) : number
|
||||
>-(1 ** 2) : number
|
||||
>(1 ** 2) : number
|
||||
>1 ** 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
>-3 : number
|
||||
>3 : number
|
||||
|
||||
1 ** 2 + 3;
|
||||
>1 ** 2 + 3 : number
|
||||
>1 ** 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
1 ** 2 - 3;
|
||||
>1 ** 2 - 3 : number
|
||||
>1 ** 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
1 ** 2 * 3;
|
||||
>1 ** 2 * 3 : number
|
||||
>1 ** 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
1 ** 2 / 3;
|
||||
>1 ** 2 / 3 : number
|
||||
>1 ** 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
1 ** 2 % 3;
|
||||
>1 ** 2 % 3 : number
|
||||
>1 ** 2 : number
|
||||
>1 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
1 ** -2 + 3;
|
||||
>1 ** -2 + 3 : number
|
||||
>1 ** -2 : number
|
||||
>1 : number
|
||||
>-2 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
1 ** -2 - 3;
|
||||
>1 ** -2 - 3 : number
|
||||
>1 ** -2 : number
|
||||
>1 : number
|
||||
>-2 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
1 ** -2 * 3;
|
||||
>1 ** -2 * 3 : number
|
||||
>1 ** -2 : number
|
||||
>1 : number
|
||||
>-2 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
1 ** -2 / 3;
|
||||
>1 ** -2 / 3 : number
|
||||
>1 ** -2 : number
|
||||
>1 : number
|
||||
>-2 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
1 ** -2 % 3;
|
||||
>1 ** -2 % 3 : number
|
||||
>1 ** -2 : number
|
||||
>1 : number
|
||||
>-2 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
2 + 3 ** 3;
|
||||
>2 + 3 ** 3 : number
|
||||
>2 : number
|
||||
>3 ** 3 : number
|
||||
>3 : number
|
||||
>3 : number
|
||||
|
||||
2 - 3 ** 3;
|
||||
>2 - 3 ** 3 : number
|
||||
>2 : number
|
||||
>3 ** 3 : number
|
||||
>3 : number
|
||||
>3 : number
|
||||
|
||||
2 * 3 ** 3;
|
||||
>2 * 3 ** 3 : number
|
||||
>2 : number
|
||||
>3 ** 3 : number
|
||||
>3 : number
|
||||
>3 : number
|
||||
|
||||
2 / 3 ** 3;
|
||||
>2 / 3 ** 3 : number
|
||||
>2 : number
|
||||
>3 ** 3 : number
|
||||
>3 : number
|
||||
>3 : number
|
||||
|
||||
2 % 3 ** 3;
|
||||
>2 % 3 ** 3 : number
|
||||
>2 : number
|
||||
>3 ** 3 : number
|
||||
>3 : number
|
||||
>3 : number
|
||||
|
||||
(2 + 3) ** 4;
|
||||
>(2 + 3) ** 4 : number
|
||||
>(2 + 3) : number
|
||||
>2 + 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
>4 : number
|
||||
|
||||
(2 - 3) ** 4;
|
||||
>(2 - 3) ** 4 : number
|
||||
>(2 - 3) : number
|
||||
>2 - 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
>4 : number
|
||||
|
||||
(2 * 3) ** 4;
|
||||
>(2 * 3) ** 4 : number
|
||||
>(2 * 3) : number
|
||||
>2 * 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
>4 : number
|
||||
|
||||
(2 / 3) ** 4;
|
||||
>(2 / 3) ** 4 : number
|
||||
>(2 / 3) : number
|
||||
>2 / 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
>4 : number
|
||||
|
||||
104
tests/baselines/reference/emitExponentiationOperator2.js
Normal file
104
tests/baselines/reference/emitExponentiationOperator2.js
Normal file
@ -0,0 +1,104 @@
|
||||
//// [emitExponentiationOperator2.ts]
|
||||
|
||||
var temp = 10;
|
||||
|
||||
++temp ** 3;
|
||||
--temp ** 3;
|
||||
temp++ ** 3;
|
||||
temp-- ** 3;
|
||||
--temp + temp ** 3;
|
||||
--temp - temp ** 3;
|
||||
--temp * temp ** 3;
|
||||
--temp / temp ** 3;
|
||||
--temp % temp ** 3;
|
||||
temp-- ** 3;
|
||||
temp++ ** 3;
|
||||
temp-- ** -temp;
|
||||
temp++ ** +temp;
|
||||
|
||||
temp-- + temp ** 3;
|
||||
temp-- - temp ** 3;
|
||||
temp-- * temp ** 3;
|
||||
temp-- / temp ** 3;
|
||||
temp-- % temp ** 3;
|
||||
|
||||
--temp + 2 ** 3;
|
||||
--temp - 2 ** 3;
|
||||
--temp * 2 ** 3;
|
||||
--temp / 2 ** 3;
|
||||
--temp % 2 ** 3;
|
||||
|
||||
++temp + 2 ** 3;
|
||||
++temp - 2 ** 3;
|
||||
++temp * 2 ** 3;
|
||||
++temp / 2 ** 3;
|
||||
|
||||
3 ** ++temp;
|
||||
3 ** --temp;
|
||||
3 ** temp++;
|
||||
3 ** temp--;
|
||||
|
||||
3 ** ++temp ** 2;
|
||||
3 ** --temp ** 2;
|
||||
3 ** temp++ ** 2;
|
||||
3 ** temp-- ** 2;
|
||||
|
||||
3 ** ++temp + 2;
|
||||
3 ** ++temp - 2;
|
||||
3 ** ++temp * 2;
|
||||
3 ** ++temp / 2;
|
||||
3 ** ++temp % 2;
|
||||
|
||||
3 ** --temp + 2;
|
||||
3 ** --temp - 2;
|
||||
3 ** --temp * 2;
|
||||
3 ** --temp / 2;
|
||||
3 ** --temp % 2;
|
||||
|
||||
//// [emitExponentiationOperator2.js]
|
||||
var temp = 10;
|
||||
Math.pow(++temp, 3);
|
||||
Math.pow(--temp, 3);
|
||||
Math.pow(temp++, 3);
|
||||
Math.pow(temp--, 3);
|
||||
--temp + Math.pow(temp, 3);
|
||||
--temp - Math.pow(temp, 3);
|
||||
--temp * Math.pow(temp, 3);
|
||||
--temp / Math.pow(temp, 3);
|
||||
--temp % Math.pow(temp, 3);
|
||||
Math.pow(temp--, 3);
|
||||
Math.pow(temp++, 3);
|
||||
Math.pow(temp--, -temp);
|
||||
Math.pow(temp++, +temp);
|
||||
temp-- + Math.pow(temp, 3);
|
||||
temp-- - Math.pow(temp, 3);
|
||||
temp-- * Math.pow(temp, 3);
|
||||
temp-- / Math.pow(temp, 3);
|
||||
temp-- % Math.pow(temp, 3);
|
||||
--temp + Math.pow(2, 3);
|
||||
--temp - Math.pow(2, 3);
|
||||
--temp * Math.pow(2, 3);
|
||||
--temp / Math.pow(2, 3);
|
||||
--temp % Math.pow(2, 3);
|
||||
++temp + Math.pow(2, 3);
|
||||
++temp - Math.pow(2, 3);
|
||||
++temp * Math.pow(2, 3);
|
||||
++temp / Math.pow(2, 3);
|
||||
Math.pow(3, ++temp);
|
||||
Math.pow(3, --temp);
|
||||
Math.pow(3, temp++);
|
||||
Math.pow(3, temp--);
|
||||
Math.pow(3, Math.pow(++temp, 2));
|
||||
Math.pow(3, Math.pow(--temp, 2));
|
||||
Math.pow(3, Math.pow(temp++, 2));
|
||||
Math.pow(3, Math.pow(temp--, 2));
|
||||
Math.pow(3, ++temp) + 2;
|
||||
Math.pow(3, ++temp) - 2;
|
||||
Math.pow(3, ++temp) * 2;
|
||||
Math.pow(3, ++temp) / 2;
|
||||
Math.pow(3, ++temp) % 2;
|
||||
Math.pow(3, --temp) + 2;
|
||||
Math.pow(3, --temp) - 2;
|
||||
Math.pow(3, --temp) * 2;
|
||||
Math.pow(3, --temp) / 2;
|
||||
Math.pow(3, --temp) % 2;
|
||||
152
tests/baselines/reference/emitExponentiationOperator2.symbols
Normal file
152
tests/baselines/reference/emitExponentiationOperator2.symbols
Normal file
@ -0,0 +1,152 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts ===
|
||||
|
||||
var temp = 10;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
++temp ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
--temp ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
temp++ ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
temp-- ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
--temp + temp ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
--temp - temp ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
--temp * temp ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
--temp / temp ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
--temp % temp ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
temp-- ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
temp++ ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
temp-- ** -temp;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
temp++ ** +temp;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
temp-- + temp ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
temp-- - temp ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
temp-- * temp ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
temp-- / temp ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
temp-- % temp ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
--temp + 2 ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
--temp - 2 ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
--temp * 2 ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
--temp / 2 ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
--temp % 2 ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
++temp + 2 ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
++temp - 2 ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
++temp * 2 ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
++temp / 2 ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** ++temp;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** --temp;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** temp++;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** temp--;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** ++temp ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** --temp ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** temp++ ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** temp-- ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** ++temp + 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** ++temp - 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** ++temp * 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** ++temp / 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** ++temp % 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** --temp + 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** --temp - 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** --temp * 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** --temp / 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
3 ** --temp % 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator2.ts, 1, 3))
|
||||
|
||||
344
tests/baselines/reference/emitExponentiationOperator2.types
Normal file
344
tests/baselines/reference/emitExponentiationOperator2.types
Normal file
@ -0,0 +1,344 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator2.ts ===
|
||||
|
||||
var temp = 10;
|
||||
>temp : number
|
||||
>10 : number
|
||||
|
||||
++temp ** 3;
|
||||
>++temp ** 3 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
--temp ** 3;
|
||||
>--temp ** 3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
temp++ ** 3;
|
||||
>temp++ ** 3 : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
temp-- ** 3;
|
||||
>temp-- ** 3 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
--temp + temp ** 3;
|
||||
>--temp + temp ** 3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>temp ** 3 : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
--temp - temp ** 3;
|
||||
>--temp - temp ** 3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>temp ** 3 : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
--temp * temp ** 3;
|
||||
>--temp * temp ** 3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>temp ** 3 : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
--temp / temp ** 3;
|
||||
>--temp / temp ** 3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>temp ** 3 : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
--temp % temp ** 3;
|
||||
>--temp % temp ** 3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>temp ** 3 : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
temp-- ** 3;
|
||||
>temp-- ** 3 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
temp++ ** 3;
|
||||
>temp++ ** 3 : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
temp-- ** -temp;
|
||||
>temp-- ** -temp : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>-temp : number
|
||||
>temp : number
|
||||
|
||||
temp++ ** +temp;
|
||||
>temp++ ** +temp : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
>+temp : number
|
||||
>temp : number
|
||||
|
||||
temp-- + temp ** 3;
|
||||
>temp-- + temp ** 3 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>temp ** 3 : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
temp-- - temp ** 3;
|
||||
>temp-- - temp ** 3 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>temp ** 3 : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
temp-- * temp ** 3;
|
||||
>temp-- * temp ** 3 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>temp ** 3 : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
temp-- / temp ** 3;
|
||||
>temp-- / temp ** 3 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>temp ** 3 : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
temp-- % temp ** 3;
|
||||
>temp-- % temp ** 3 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>temp ** 3 : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
--temp + 2 ** 3;
|
||||
>--temp + 2 ** 3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 ** 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
--temp - 2 ** 3;
|
||||
>--temp - 2 ** 3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 ** 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
--temp * 2 ** 3;
|
||||
>--temp * 2 ** 3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 ** 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
--temp / 2 ** 3;
|
||||
>--temp / 2 ** 3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 ** 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
--temp % 2 ** 3;
|
||||
>--temp % 2 ** 3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 ** 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
++temp + 2 ** 3;
|
||||
>++temp + 2 ** 3 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>2 ** 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
++temp - 2 ** 3;
|
||||
>++temp - 2 ** 3 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>2 ** 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
++temp * 2 ** 3;
|
||||
>++temp * 2 ** 3 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>2 ** 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
++temp / 2 ** 3;
|
||||
>++temp / 2 ** 3 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>2 ** 3 : number
|
||||
>2 : number
|
||||
>3 : number
|
||||
|
||||
3 ** ++temp;
|
||||
>3 ** ++temp : number
|
||||
>3 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
|
||||
3 ** --temp;
|
||||
>3 ** --temp : number
|
||||
>3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
|
||||
3 ** temp++;
|
||||
>3 ** temp++ : number
|
||||
>3 : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
|
||||
3 ** temp--;
|
||||
>3 ** temp-- : number
|
||||
>3 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
|
||||
3 ** ++temp ** 2;
|
||||
>3 ** ++temp ** 2 : number
|
||||
>3 : number
|
||||
>++temp ** 2 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** --temp ** 2;
|
||||
>3 ** --temp ** 2 : number
|
||||
>3 : number
|
||||
>--temp ** 2 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** temp++ ** 2;
|
||||
>3 ** temp++ ** 2 : number
|
||||
>3 : number
|
||||
>temp++ ** 2 : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** temp-- ** 2;
|
||||
>3 ** temp-- ** 2 : number
|
||||
>3 : number
|
||||
>temp-- ** 2 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** ++temp + 2;
|
||||
>3 ** ++temp + 2 : number
|
||||
>3 ** ++temp : number
|
||||
>3 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** ++temp - 2;
|
||||
>3 ** ++temp - 2 : number
|
||||
>3 ** ++temp : number
|
||||
>3 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** ++temp * 2;
|
||||
>3 ** ++temp * 2 : number
|
||||
>3 ** ++temp : number
|
||||
>3 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** ++temp / 2;
|
||||
>3 ** ++temp / 2 : number
|
||||
>3 ** ++temp : number
|
||||
>3 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** ++temp % 2;
|
||||
>3 ** ++temp % 2 : number
|
||||
>3 ** ++temp : number
|
||||
>3 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** --temp + 2;
|
||||
>3 ** --temp + 2 : number
|
||||
>3 ** --temp : number
|
||||
>3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** --temp - 2;
|
||||
>3 ** --temp - 2 : number
|
||||
>3 ** --temp : number
|
||||
>3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** --temp * 2;
|
||||
>3 ** --temp * 2 : number
|
||||
>3 ** --temp : number
|
||||
>3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** --temp / 2;
|
||||
>3 ** --temp / 2 : number
|
||||
>3 ** --temp : number
|
||||
>3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** --temp % 2;
|
||||
>3 ** --temp % 2 : number
|
||||
>3 ** --temp : number
|
||||
>3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
78
tests/baselines/reference/emitExponentiationOperator3.js
Normal file
78
tests/baselines/reference/emitExponentiationOperator3.js
Normal file
@ -0,0 +1,78 @@
|
||||
//// [emitExponentiationOperator3.ts]
|
||||
|
||||
var temp = 10;
|
||||
|
||||
(-++temp) ** 3;
|
||||
(+--temp) ** 3;
|
||||
(-temp++) ** 3;
|
||||
(+temp--) ** 3;
|
||||
(-(1 ** ++temp)) ** 3;
|
||||
(-(1 ** --temp)) ** 3;
|
||||
(-(1 ** temp++)) ** 3;
|
||||
(-(1 ** temp--)) ** 3;
|
||||
|
||||
(-3) ** temp++;
|
||||
(-3) ** temp--;
|
||||
(-3) ** ++temp;
|
||||
(-3) ** --temp;
|
||||
(+3) ** temp++;
|
||||
(+3) ** temp--;
|
||||
(+3) ** ++temp;
|
||||
(+3) ** --temp;
|
||||
(-3) ** temp++ ** 2;
|
||||
(-3) ** temp-- ** 2;
|
||||
(-3) ** ++temp ** 2;
|
||||
(-3) ** --temp ** 2;
|
||||
(+3) ** temp++ ** 2;
|
||||
(+3) ** temp-- ** 2;
|
||||
(+3) ** ++temp ** 2;
|
||||
(+3) ** --temp ** 2;
|
||||
|
||||
3 ** -temp++;
|
||||
3 ** -temp--;
|
||||
3 ** -++temp;
|
||||
3 ** +--temp;
|
||||
3 ** (-temp++) ** 2;
|
||||
3 ** (-temp--) ** 2;
|
||||
3 ** (+temp++) ** 2;
|
||||
3 ** (+temp--) ** 2;
|
||||
3 ** (-++temp) ** 2;
|
||||
3 ** (+--temp) ** 2;
|
||||
|
||||
|
||||
//// [emitExponentiationOperator3.js]
|
||||
var temp = 10;
|
||||
Math.pow((-++temp), 3);
|
||||
Math.pow((+--temp), 3);
|
||||
Math.pow((-temp++), 3);
|
||||
Math.pow((+temp--), 3);
|
||||
Math.pow((-(Math.pow(1, ++temp))), 3);
|
||||
Math.pow((-(Math.pow(1, --temp))), 3);
|
||||
Math.pow((-(Math.pow(1, temp++))), 3);
|
||||
Math.pow((-(Math.pow(1, temp--))), 3);
|
||||
Math.pow((-3), temp++);
|
||||
Math.pow((-3), temp--);
|
||||
Math.pow((-3), ++temp);
|
||||
Math.pow((-3), --temp);
|
||||
Math.pow((+3), temp++);
|
||||
Math.pow((+3), temp--);
|
||||
Math.pow((+3), ++temp);
|
||||
Math.pow((+3), --temp);
|
||||
Math.pow((-3), Math.pow(temp++, 2));
|
||||
Math.pow((-3), Math.pow(temp--, 2));
|
||||
Math.pow((-3), Math.pow(++temp, 2));
|
||||
Math.pow((-3), Math.pow(--temp, 2));
|
||||
Math.pow((+3), Math.pow(temp++, 2));
|
||||
Math.pow((+3), Math.pow(temp--, 2));
|
||||
Math.pow((+3), Math.pow(++temp, 2));
|
||||
Math.pow((+3), Math.pow(--temp, 2));
|
||||
Math.pow(3, -temp++);
|
||||
Math.pow(3, -temp--);
|
||||
Math.pow(3, -++temp);
|
||||
Math.pow(3, +--temp);
|
||||
Math.pow(3, Math.pow((-temp++), 2));
|
||||
Math.pow(3, Math.pow((-temp--), 2));
|
||||
Math.pow(3, Math.pow((+temp++), 2));
|
||||
Math.pow(3, Math.pow((+temp--), 2));
|
||||
Math.pow(3, Math.pow((-++temp), 2));
|
||||
Math.pow(3, Math.pow((+--temp), 2));
|
||||
107
tests/baselines/reference/emitExponentiationOperator3.symbols
Normal file
107
tests/baselines/reference/emitExponentiationOperator3.symbols
Normal file
@ -0,0 +1,107 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts ===
|
||||
|
||||
var temp = 10;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-++temp) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(+--temp) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-temp++) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(+temp--) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-(1 ** ++temp)) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-(1 ** --temp)) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-(1 ** temp++)) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-(1 ** temp--)) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-3) ** temp++;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-3) ** temp--;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-3) ** ++temp;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-3) ** --temp;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(+3) ** temp++;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(+3) ** temp--;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(+3) ** ++temp;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(+3) ** --temp;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-3) ** temp++ ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-3) ** temp-- ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-3) ** ++temp ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(-3) ** --temp ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(+3) ** temp++ ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(+3) ** temp-- ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(+3) ** ++temp ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
(+3) ** --temp ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
3 ** -temp++;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
3 ** -temp--;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
3 ** -++temp;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
3 ** +--temp;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
3 ** (-temp++) ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
3 ** (-temp--) ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
3 ** (+temp++) ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
3 ** (+temp--) ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
3 ** (-++temp) ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
3 ** (+--temp) ** 2;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator3.ts, 1, 3))
|
||||
|
||||
314
tests/baselines/reference/emitExponentiationOperator3.types
Normal file
314
tests/baselines/reference/emitExponentiationOperator3.types
Normal file
@ -0,0 +1,314 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator3.ts ===
|
||||
|
||||
var temp = 10;
|
||||
>temp : number
|
||||
>10 : number
|
||||
|
||||
(-++temp) ** 3;
|
||||
>(-++temp) ** 3 : number
|
||||
>(-++temp) : number
|
||||
>-++temp : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
(+--temp) ** 3;
|
||||
>(+--temp) ** 3 : number
|
||||
>(+--temp) : number
|
||||
>+--temp : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
(-temp++) ** 3;
|
||||
>(-temp++) ** 3 : number
|
||||
>(-temp++) : number
|
||||
>-temp++ : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
(+temp--) ** 3;
|
||||
>(+temp--) ** 3 : number
|
||||
>(+temp--) : number
|
||||
>+temp-- : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
(-(1 ** ++temp)) ** 3;
|
||||
>(-(1 ** ++temp)) ** 3 : number
|
||||
>(-(1 ** ++temp)) : number
|
||||
>-(1 ** ++temp) : number
|
||||
>(1 ** ++temp) : number
|
||||
>1 ** ++temp : number
|
||||
>1 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
(-(1 ** --temp)) ** 3;
|
||||
>(-(1 ** --temp)) ** 3 : number
|
||||
>(-(1 ** --temp)) : number
|
||||
>-(1 ** --temp) : number
|
||||
>(1 ** --temp) : number
|
||||
>1 ** --temp : number
|
||||
>1 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
(-(1 ** temp++)) ** 3;
|
||||
>(-(1 ** temp++)) ** 3 : number
|
||||
>(-(1 ** temp++)) : number
|
||||
>-(1 ** temp++) : number
|
||||
>(1 ** temp++) : number
|
||||
>1 ** temp++ : number
|
||||
>1 : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
(-(1 ** temp--)) ** 3;
|
||||
>(-(1 ** temp--)) ** 3 : number
|
||||
>(-(1 ** temp--)) : number
|
||||
>-(1 ** temp--) : number
|
||||
>(1 ** temp--) : number
|
||||
>1 ** temp-- : number
|
||||
>1 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>3 : number
|
||||
|
||||
(-3) ** temp++;
|
||||
>(-3) ** temp++ : number
|
||||
>(-3) : number
|
||||
>-3 : number
|
||||
>3 : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
|
||||
(-3) ** temp--;
|
||||
>(-3) ** temp-- : number
|
||||
>(-3) : number
|
||||
>-3 : number
|
||||
>3 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
|
||||
(-3) ** ++temp;
|
||||
>(-3) ** ++temp : number
|
||||
>(-3) : number
|
||||
>-3 : number
|
||||
>3 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
|
||||
(-3) ** --temp;
|
||||
>(-3) ** --temp : number
|
||||
>(-3) : number
|
||||
>-3 : number
|
||||
>3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
|
||||
(+3) ** temp++;
|
||||
>(+3) ** temp++ : number
|
||||
>(+3) : number
|
||||
>+3 : number
|
||||
>3 : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
|
||||
(+3) ** temp--;
|
||||
>(+3) ** temp-- : number
|
||||
>(+3) : number
|
||||
>+3 : number
|
||||
>3 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
|
||||
(+3) ** ++temp;
|
||||
>(+3) ** ++temp : number
|
||||
>(+3) : number
|
||||
>+3 : number
|
||||
>3 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
|
||||
(+3) ** --temp;
|
||||
>(+3) ** --temp : number
|
||||
>(+3) : number
|
||||
>+3 : number
|
||||
>3 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
|
||||
(-3) ** temp++ ** 2;
|
||||
>(-3) ** temp++ ** 2 : number
|
||||
>(-3) : number
|
||||
>-3 : number
|
||||
>3 : number
|
||||
>temp++ ** 2 : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
(-3) ** temp-- ** 2;
|
||||
>(-3) ** temp-- ** 2 : number
|
||||
>(-3) : number
|
||||
>-3 : number
|
||||
>3 : number
|
||||
>temp-- ** 2 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
(-3) ** ++temp ** 2;
|
||||
>(-3) ** ++temp ** 2 : number
|
||||
>(-3) : number
|
||||
>-3 : number
|
||||
>3 : number
|
||||
>++temp ** 2 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
(-3) ** --temp ** 2;
|
||||
>(-3) ** --temp ** 2 : number
|
||||
>(-3) : number
|
||||
>-3 : number
|
||||
>3 : number
|
||||
>--temp ** 2 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
(+3) ** temp++ ** 2;
|
||||
>(+3) ** temp++ ** 2 : number
|
||||
>(+3) : number
|
||||
>+3 : number
|
||||
>3 : number
|
||||
>temp++ ** 2 : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
(+3) ** temp-- ** 2;
|
||||
>(+3) ** temp-- ** 2 : number
|
||||
>(+3) : number
|
||||
>+3 : number
|
||||
>3 : number
|
||||
>temp-- ** 2 : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
(+3) ** ++temp ** 2;
|
||||
>(+3) ** ++temp ** 2 : number
|
||||
>(+3) : number
|
||||
>+3 : number
|
||||
>3 : number
|
||||
>++temp ** 2 : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
(+3) ** --temp ** 2;
|
||||
>(+3) ** --temp ** 2 : number
|
||||
>(+3) : number
|
||||
>+3 : number
|
||||
>3 : number
|
||||
>--temp ** 2 : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** -temp++;
|
||||
>3 ** -temp++ : number
|
||||
>3 : number
|
||||
>-temp++ : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
|
||||
3 ** -temp--;
|
||||
>3 ** -temp-- : number
|
||||
>3 : number
|
||||
>-temp-- : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
|
||||
3 ** -++temp;
|
||||
>3 ** -++temp : number
|
||||
>3 : number
|
||||
>-++temp : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
|
||||
3 ** +--temp;
|
||||
>3 ** +--temp : number
|
||||
>3 : number
|
||||
>+--temp : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
|
||||
3 ** (-temp++) ** 2;
|
||||
>3 ** (-temp++) ** 2 : number
|
||||
>3 : number
|
||||
>(-temp++) ** 2 : number
|
||||
>(-temp++) : number
|
||||
>-temp++ : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** (-temp--) ** 2;
|
||||
>3 ** (-temp--) ** 2 : number
|
||||
>3 : number
|
||||
>(-temp--) ** 2 : number
|
||||
>(-temp--) : number
|
||||
>-temp-- : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** (+temp++) ** 2;
|
||||
>3 ** (+temp++) ** 2 : number
|
||||
>3 : number
|
||||
>(+temp++) ** 2 : number
|
||||
>(+temp++) : number
|
||||
>+temp++ : number
|
||||
>temp++ : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** (+temp--) ** 2;
|
||||
>3 ** (+temp--) ** 2 : number
|
||||
>3 : number
|
||||
>(+temp--) ** 2 : number
|
||||
>(+temp--) : number
|
||||
>+temp-- : number
|
||||
>temp-- : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** (-++temp) ** 2;
|
||||
>3 ** (-++temp) ** 2 : number
|
||||
>3 : number
|
||||
>(-++temp) ** 2 : number
|
||||
>(-++temp) : number
|
||||
>-++temp : number
|
||||
>++temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
3 ** (+--temp) ** 2;
|
||||
>3 ** (+--temp) ** 2 : number
|
||||
>3 : number
|
||||
>(+--temp) ** 2 : number
|
||||
>(+--temp) : number
|
||||
>+--temp : number
|
||||
>--temp : number
|
||||
>temp : number
|
||||
>2 : number
|
||||
|
||||
70
tests/baselines/reference/emitExponentiationOperator4.js
Normal file
70
tests/baselines/reference/emitExponentiationOperator4.js
Normal file
@ -0,0 +1,70 @@
|
||||
//// [emitExponentiationOperator4.ts]
|
||||
var temp: any;
|
||||
|
||||
(<number>temp) ** 3;
|
||||
(<number>--temp) ** 3;
|
||||
(<number>++temp) ** 3;
|
||||
(<number>temp--) ** 3;
|
||||
(<number>temp++) ** 3;
|
||||
|
||||
1 ** (<number>--temp) ** 3;
|
||||
1 ** (<number>++temp) ** 3;
|
||||
1 ** (<number>temp--) ** 3;
|
||||
1 ** (<number>temp++) ** 3;
|
||||
|
||||
(void --temp) ** 3;
|
||||
(void temp--) ** 3;
|
||||
(void 3) ** 4;
|
||||
(void temp++) ** 4;
|
||||
(void temp--) ** 4;
|
||||
|
||||
|
||||
1 ** (void --temp) ** 3;
|
||||
1 ** (void temp--) ** 3;
|
||||
1 ** (void 3) ** 4;
|
||||
1 ** (void temp++) ** 4;
|
||||
1 ** (void temp--) ** 4;
|
||||
|
||||
(~ --temp) ** 3;
|
||||
(~ temp--) ** 3;
|
||||
(~ 3) ** 4;
|
||||
(~ temp++) ** 4;
|
||||
(~ temp--) ** 4;
|
||||
|
||||
1 ** (~ --temp) ** 3;
|
||||
1 ** (~ temp--) ** 3;
|
||||
1 ** (~ 3) ** 4;
|
||||
1 ** (~ temp++) ** 4;
|
||||
1 ** (~ temp--) ** 4;
|
||||
|
||||
//// [emitExponentiationOperator4.js]
|
||||
var temp;
|
||||
Math.pow(temp, 3);
|
||||
Math.pow((--temp), 3);
|
||||
Math.pow((++temp), 3);
|
||||
Math.pow((temp--), 3);
|
||||
Math.pow((temp++), 3);
|
||||
Math.pow(1, Math.pow((--temp), 3));
|
||||
Math.pow(1, Math.pow((++temp), 3));
|
||||
Math.pow(1, Math.pow((temp--), 3));
|
||||
Math.pow(1, Math.pow((temp++), 3));
|
||||
Math.pow((void --temp), 3);
|
||||
Math.pow((void temp--), 3);
|
||||
Math.pow((void 3), 4);
|
||||
Math.pow((void temp++), 4);
|
||||
Math.pow((void temp--), 4);
|
||||
Math.pow(1, Math.pow((void --temp), 3));
|
||||
Math.pow(1, Math.pow((void temp--), 3));
|
||||
Math.pow(1, Math.pow((void 3), 4));
|
||||
Math.pow(1, Math.pow((void temp++), 4));
|
||||
Math.pow(1, Math.pow((void temp--), 4));
|
||||
Math.pow((~--temp), 3);
|
||||
Math.pow((~temp--), 3);
|
||||
Math.pow((~3), 4);
|
||||
Math.pow((~temp++), 4);
|
||||
Math.pow((~temp--), 4);
|
||||
Math.pow(1, Math.pow((~--temp), 3));
|
||||
Math.pow(1, Math.pow((~temp--), 3));
|
||||
Math.pow(1, Math.pow((~3), 4));
|
||||
Math.pow(1, Math.pow((~temp++), 4));
|
||||
Math.pow(1, Math.pow((~temp--), 4));
|
||||
@ -0,0 +1,84 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4.ts ===
|
||||
var temp: any;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
(<number>temp) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
(<number>--temp) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
(<number>++temp) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
(<number>temp--) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
(<number>temp++) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
1 ** (<number>--temp) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
1 ** (<number>++temp) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
1 ** (<number>temp--) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
1 ** (<number>temp++) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
(void --temp) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
(void temp--) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
(void 3) ** 4;
|
||||
(void temp++) ** 4;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
(void temp--) ** 4;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
|
||||
1 ** (void --temp) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
1 ** (void temp--) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
1 ** (void 3) ** 4;
|
||||
1 ** (void temp++) ** 4;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
1 ** (void temp--) ** 4;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
(~ --temp) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
(~ temp--) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
(~ 3) ** 4;
|
||||
(~ temp++) ** 4;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
(~ temp--) ** 4;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
1 ** (~ --temp) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
1 ** (~ temp--) ** 3;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
1 ** (~ 3) ** 4;
|
||||
1 ** (~ temp++) ** 4;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
1 ** (~ temp--) ** 4;
|
||||
>temp : Symbol(temp, Decl(emitExponentiationOperator4.ts, 0, 3))
|
||||
|
||||
260
tests/baselines/reference/emitExponentiationOperator4.types
Normal file
260
tests/baselines/reference/emitExponentiationOperator4.types
Normal file
@ -0,0 +1,260 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperator4.ts ===
|
||||
var temp: any;
|
||||
>temp : any
|
||||
|
||||
(<number>temp) ** 3;
|
||||
>(<number>temp) ** 3 : number
|
||||
>(<number>temp) : number
|
||||
><number>temp : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
(<number>--temp) ** 3;
|
||||
>(<number>--temp) ** 3 : number
|
||||
>(<number>--temp) : number
|
||||
><number>--temp : number
|
||||
>--temp : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
(<number>++temp) ** 3;
|
||||
>(<number>++temp) ** 3 : number
|
||||
>(<number>++temp) : number
|
||||
><number>++temp : number
|
||||
>++temp : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
(<number>temp--) ** 3;
|
||||
>(<number>temp--) ** 3 : number
|
||||
>(<number>temp--) : number
|
||||
><number>temp-- : number
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
(<number>temp++) ** 3;
|
||||
>(<number>temp++) ** 3 : number
|
||||
>(<number>temp++) : number
|
||||
><number>temp++ : number
|
||||
>temp++ : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
1 ** (<number>--temp) ** 3;
|
||||
>1 ** (<number>--temp) ** 3 : number
|
||||
>1 : number
|
||||
>(<number>--temp) ** 3 : number
|
||||
>(<number>--temp) : number
|
||||
><number>--temp : number
|
||||
>--temp : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
1 ** (<number>++temp) ** 3;
|
||||
>1 ** (<number>++temp) ** 3 : number
|
||||
>1 : number
|
||||
>(<number>++temp) ** 3 : number
|
||||
>(<number>++temp) : number
|
||||
><number>++temp : number
|
||||
>++temp : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
1 ** (<number>temp--) ** 3;
|
||||
>1 ** (<number>temp--) ** 3 : number
|
||||
>1 : number
|
||||
>(<number>temp--) ** 3 : number
|
||||
>(<number>temp--) : number
|
||||
><number>temp-- : number
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
1 ** (<number>temp++) ** 3;
|
||||
>1 ** (<number>temp++) ** 3 : number
|
||||
>1 : number
|
||||
>(<number>temp++) ** 3 : number
|
||||
>(<number>temp++) : number
|
||||
><number>temp++ : number
|
||||
>temp++ : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
(void --temp) ** 3;
|
||||
>(void --temp) ** 3 : number
|
||||
>(void --temp) : undefined
|
||||
>void --temp : undefined
|
||||
>--temp : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
(void temp--) ** 3;
|
||||
>(void temp--) ** 3 : number
|
||||
>(void temp--) : undefined
|
||||
>void temp-- : undefined
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
(void 3) ** 4;
|
||||
>(void 3) ** 4 : number
|
||||
>(void 3) : undefined
|
||||
>void 3 : undefined
|
||||
>3 : number
|
||||
>4 : number
|
||||
|
||||
(void temp++) ** 4;
|
||||
>(void temp++) ** 4 : number
|
||||
>(void temp++) : undefined
|
||||
>void temp++ : undefined
|
||||
>temp++ : number
|
||||
>temp : any
|
||||
>4 : number
|
||||
|
||||
(void temp--) ** 4;
|
||||
>(void temp--) ** 4 : number
|
||||
>(void temp--) : undefined
|
||||
>void temp-- : undefined
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>4 : number
|
||||
|
||||
|
||||
1 ** (void --temp) ** 3;
|
||||
>1 ** (void --temp) ** 3 : number
|
||||
>1 : number
|
||||
>(void --temp) ** 3 : number
|
||||
>(void --temp) : undefined
|
||||
>void --temp : undefined
|
||||
>--temp : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
1 ** (void temp--) ** 3;
|
||||
>1 ** (void temp--) ** 3 : number
|
||||
>1 : number
|
||||
>(void temp--) ** 3 : number
|
||||
>(void temp--) : undefined
|
||||
>void temp-- : undefined
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
1 ** (void 3) ** 4;
|
||||
>1 ** (void 3) ** 4 : number
|
||||
>1 : number
|
||||
>(void 3) ** 4 : number
|
||||
>(void 3) : undefined
|
||||
>void 3 : undefined
|
||||
>3 : number
|
||||
>4 : number
|
||||
|
||||
1 ** (void temp++) ** 4;
|
||||
>1 ** (void temp++) ** 4 : number
|
||||
>1 : number
|
||||
>(void temp++) ** 4 : number
|
||||
>(void temp++) : undefined
|
||||
>void temp++ : undefined
|
||||
>temp++ : number
|
||||
>temp : any
|
||||
>4 : number
|
||||
|
||||
1 ** (void temp--) ** 4;
|
||||
>1 ** (void temp--) ** 4 : number
|
||||
>1 : number
|
||||
>(void temp--) ** 4 : number
|
||||
>(void temp--) : undefined
|
||||
>void temp-- : undefined
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>4 : number
|
||||
|
||||
(~ --temp) ** 3;
|
||||
>(~ --temp) ** 3 : number
|
||||
>(~ --temp) : number
|
||||
>~ --temp : number
|
||||
>--temp : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
(~ temp--) ** 3;
|
||||
>(~ temp--) ** 3 : number
|
||||
>(~ temp--) : number
|
||||
>~ temp-- : number
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
(~ 3) ** 4;
|
||||
>(~ 3) ** 4 : number
|
||||
>(~ 3) : number
|
||||
>~ 3 : number
|
||||
>3 : number
|
||||
>4 : number
|
||||
|
||||
(~ temp++) ** 4;
|
||||
>(~ temp++) ** 4 : number
|
||||
>(~ temp++) : number
|
||||
>~ temp++ : number
|
||||
>temp++ : number
|
||||
>temp : any
|
||||
>4 : number
|
||||
|
||||
(~ temp--) ** 4;
|
||||
>(~ temp--) ** 4 : number
|
||||
>(~ temp--) : number
|
||||
>~ temp-- : number
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>4 : number
|
||||
|
||||
1 ** (~ --temp) ** 3;
|
||||
>1 ** (~ --temp) ** 3 : number
|
||||
>1 : number
|
||||
>(~ --temp) ** 3 : number
|
||||
>(~ --temp) : number
|
||||
>~ --temp : number
|
||||
>--temp : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
1 ** (~ temp--) ** 3;
|
||||
>1 ** (~ temp--) ** 3 : number
|
||||
>1 : number
|
||||
>(~ temp--) ** 3 : number
|
||||
>(~ temp--) : number
|
||||
>~ temp-- : number
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>3 : number
|
||||
|
||||
1 ** (~ 3) ** 4;
|
||||
>1 ** (~ 3) ** 4 : number
|
||||
>1 : number
|
||||
>(~ 3) ** 4 : number
|
||||
>(~ 3) : number
|
||||
>~ 3 : number
|
||||
>3 : number
|
||||
>4 : number
|
||||
|
||||
1 ** (~ temp++) ** 4;
|
||||
>1 ** (~ temp++) ** 4 : number
|
||||
>1 : number
|
||||
>(~ temp++) ** 4 : number
|
||||
>(~ temp++) : number
|
||||
>~ temp++ : number
|
||||
>temp++ : number
|
||||
>temp : any
|
||||
>4 : number
|
||||
|
||||
1 ** (~ temp--) ** 4;
|
||||
>1 ** (~ temp--) ** 4 : number
|
||||
>1 : number
|
||||
>(~ temp--) ** 4 : number
|
||||
>(~ temp--) : number
|
||||
>~ temp-- : number
|
||||
>temp-- : number
|
||||
>temp : any
|
||||
>4 : number
|
||||
|
||||
@ -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)));
|
||||
@ -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))
|
||||
|
||||
@ -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
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
//// [emitExponentiationOperatorInTempalteString4ES6.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)}`;
|
||||
|
||||
//// [emitExponentiationOperatorInTempalteString4ES6.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)))}`;
|
||||
@ -0,0 +1,114 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4ES6.ts ===
|
||||
|
||||
var t1 = 10;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
var t2 = 10;
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
|
||||
var s;
|
||||
>s : Symbol(s, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 3, 3))
|
||||
|
||||
// With TemplateTail
|
||||
`${t1 ** -t2} world`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
|
||||
`${(-t1) ** t2 - t1} world`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
`${(-++t1) ** t2 - t1} world`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
`${(-t1++) ** t2 - t1} world`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
`${(~t1) ** t2 ** --t1 } world`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
`${typeof (t1 ** t2 ** t1) } world`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
// TempateHead & TemplateTail are empt
|
||||
`${t1 ** -t2} hello world ${t1 ** -t2}`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
|
||||
`${(-t1) ** t2 - t1} hello world ${(-t1) ** t2 - t1}`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
`${(-++t1) ** t2 - t1} hello world ${t1 ** (-++t1) **- t1}`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
`${(-t1++) ** t2 - t1} hello world ${t2 ** (-t1++) ** - t1}`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
`${(~t1) ** t2 ** --t1 } hello world ${(~t1) ** t2 ** --t1 }`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
`${typeof (t1 ** t2 ** t1)} hello world ${typeof (t1 ** t2 ** t1)}`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
// With templateHead
|
||||
`hello ${(-t1) ** t2 - t1}`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
`hello ${(-++t1) ** t2 - t1}`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
`hello ${(-t1++) ** t2 - t1}`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
`hello ${(~t1) ** t2 ** --t1 }`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
`hello ${typeof (t1 ** t2 ** t1)}`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 2, 3))
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTempalteString4ES6.ts, 1, 3))
|
||||
|
||||
@ -0,0 +1,233 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTempalteString4ES6.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
|
||||
|
||||
@ -0,0 +1,53 @@
|
||||
//// [emitExponentiationOperatorInTemplateString1.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) }`;
|
||||
|
||||
//// [emitExponentiationOperatorInTemplateString1.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)));
|
||||
@ -0,0 +1,143 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.ts ===
|
||||
|
||||
var t1 = 10;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3))
|
||||
|
||||
var t2 = 10;
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 3))
|
||||
|
||||
var s;
|
||||
>s : Symbol(s, Decl(emitExponentiationOperatorInTemplateString1.ts, 3, 3))
|
||||
|
||||
// TempateHead & TemplateTail are empty
|
||||
`${t1 ** t2}`;
|
||||
>t1 : Symbol(t1, Decl(emitExponentiationOperatorInTemplateString1.ts, 1, 3))
|
||||
>t2 : Symbol(t2, Decl(emitExponentiationOperatorInTemplateString1.ts, 2, 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))
|
||||
|
||||
`${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 ** 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 + 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))
|
||||
|
||||
`${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))
|
||||
|
||||
`${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))
|
||||
|
||||
`${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))
|
||||
|
||||
`${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))
|
||||
|
||||
`${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))
|
||||
|
||||
`${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))
|
||||
|
||||
`${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))
|
||||
|
||||
`${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))
|
||||
|
||||
`${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))
|
||||
|
||||
`${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))
|
||||
|
||||
`${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))
|
||||
|
||||
`${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))
|
||||
|
||||
`${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))
|
||||
|
||||
`${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))
|
||||
|
||||
@ -0,0 +1,240 @@
|
||||
=== tests/cases/conformance/es7/exponentiationOperator/emitExponentiationOperatorInTemplateString1.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
|
||||
|
||||
@ -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)))}`;
|
||||
@ -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))
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)));
|
||||
@ -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))
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)))}`;
|
||||
@ -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))
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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))) + " !!";
|
||||
@ -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))
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)))} !!`;
|
||||
@ -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))
|
||||
|
||||
@ -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
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user