Merge pull request #15473 from Microsoft/dynamicNames

Allow dynamic names in types
This commit is contained in:
Ron Buckton
2017-11-15 18:04:48 -08:00
committed by GitHub
171 changed files with 10267 additions and 1174 deletions
+1 -1
View File
@@ -1680,7 +1680,7 @@ namespace ts {
function bindAnonymousDeclaration(node: Declaration, symbolFlags: SymbolFlags, name: __String) {
const symbol = createSymbol(symbolFlags, name);
if (symbolFlags & SymbolFlags.EnumMember) {
if (symbolFlags & (SymbolFlags.EnumMember | SymbolFlags.ClassMember)) {
symbol.parent = container.symbol;
}
addDeclarationToSymbol(symbol, node, symbolFlags);
+525 -114
View File
File diff suppressed because it is too large Load Diff
+107 -11
View File
@@ -190,6 +190,7 @@ namespace ts {
const writer = <EmitTextWriterWithSymbolWriter>createTextWriter(newLine);
writer.trackSymbol = trackSymbol;
writer.reportInaccessibleThisError = reportInaccessibleThisError;
writer.reportInaccessibleUniqueSymbolError = reportInaccessibleUniqueSymbolError;
writer.reportPrivateInBaseOfClassExpression = reportPrivateInBaseOfClassExpression;
writer.writeKeyword = writer.write;
writer.writeOperator = writer.write;
@@ -322,11 +323,21 @@ namespace ts {
}
}
function reportInaccessibleUniqueSymbolError() {
if (errorNameNode) {
reportedDeclarationError = true;
emitterDiagnostics.add(createDiagnosticForNode(errorNameNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,
declarationNameToString(errorNameNode),
"unique symbol"));
}
}
function reportInaccessibleThisError() {
if (errorNameNode) {
reportedDeclarationError = true;
emitterDiagnostics.add(createDiagnosticForNode(errorNameNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_this_type_A_type_annotation_is_necessary,
declarationNameToString(errorNameNode)));
emitterDiagnostics.add(createDiagnosticForNode(errorNameNode, Diagnostics.The_inferred_type_of_0_references_an_inaccessible_1_type_A_type_annotation_is_necessary,
declarationNameToString(errorNameNode),
"this"));
}
}
@@ -1227,7 +1238,7 @@ namespace ts {
}
function emitPropertyDeclaration(node: Declaration) {
if (hasDynamicName(node)) {
if (hasDynamicName(node) && !resolver.isLateBound(node)) {
return;
}
@@ -1246,10 +1257,8 @@ namespace ts {
emitBindingPattern(<BindingPattern>node.name);
}
else {
// If this node is a computed name, it can only be a symbol, because we've already skipped
// it if it's not a well known symbol. In that case, the text of the name will be exactly
// what we want, namely the name expression enclosed in brackets.
writeTextOfNode(currentText, node.name);
writeNameOfDeclaration(node, getVariableDeclarationTypeVisibilityError);
// If optional property emit ? but in the case of parameterProperty declaration with "?" indicating optional parameter for the constructor
// we don't want to emit property declaration with "?"
if ((node.kind === SyntaxKind.PropertyDeclaration || node.kind === SyntaxKind.PropertySignature ||
@@ -1387,7 +1396,7 @@ namespace ts {
}
function emitAccessorDeclaration(node: AccessorDeclaration) {
if (hasDynamicName(node)) {
if (hasDynamicName(node) && !resolver.isLateBound(node)) {
return;
}
@@ -1398,7 +1407,7 @@ namespace ts {
emitJsDocComments(accessors.getAccessor);
emitJsDocComments(accessors.setAccessor);
emitClassMemberDeclarationFlags(getModifierFlags(node) | (accessors.setAccessor ? 0 : ModifierFlags.Readonly));
writeTextOfNode(currentText, node.name);
writeNameOfDeclaration(node, getAccessorNameVisibilityError);
if (!hasModifier(node, ModifierFlags.Private)) {
accessorWithTypeAnnotation = node;
let type = getTypeAnnotationFromAccessor(node);
@@ -1426,6 +1435,37 @@ namespace ts {
}
}
function getAccessorNameVisibilityError(symbolAccessibilityResult: SymbolAccessibilityResult) {
const diagnosticMessage = getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult);
return diagnosticMessage !== undefined ? {
diagnosticMessage,
errorNode: node,
typeName: node.name
} : undefined;
}
function getAccessorNameVisibilityDiagnosticMessage(symbolAccessibilityResult: SymbolAccessibilityResult) {
if (hasModifier(node, ModifierFlags.Static)) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ?
Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
Diagnostics.Public_static_property_0_of_exported_class_has_or_is_using_private_name_1;
}
else if (node.parent.kind === SyntaxKind.ClassDeclaration) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ?
Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
Diagnostics.Public_property_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
Diagnostics.Public_property_0_of_exported_class_has_or_is_using_private_name_1;
}
else {
return symbolAccessibilityResult.errorModuleName ?
Diagnostics.Property_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 :
Diagnostics.Property_0_of_exported_interface_has_or_is_using_private_name_1;
}
}
function getAccessorDeclarationTypeVisibilityError(symbolAccessibilityResult: SymbolAccessibilityResult): SymbolAccessibilityDiagnostic {
let diagnosticMessage: DiagnosticMessage;
if (accessorWithTypeAnnotation.kind === SyntaxKind.SetAccessor) {
@@ -1467,7 +1507,7 @@ namespace ts {
}
function writeFunctionDeclaration(node: FunctionLikeDeclaration) {
if (hasDynamicName(node)) {
if (hasDynamicName(node) && !resolver.isLateBound(node)) {
return;
}
@@ -1489,13 +1529,69 @@ namespace ts {
write("constructor");
}
else {
writeTextOfNode(currentText, node.name);
writeNameOfDeclaration(node, getMethodNameVisibilityError);
if (hasQuestionToken(node)) {
write("?");
}
}
emitSignatureDeclaration(node);
}
function getMethodNameVisibilityError(symbolAccessibilityResult: SymbolAccessibilityResult): SymbolAccessibilityDiagnostic {
const diagnosticMessage = getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult);
return diagnosticMessage !== undefined ? {
diagnosticMessage,
errorNode: node,
typeName: node.name
} : undefined;
}
function getMethodNameVisibilityDiagnosticMessage(symbolAccessibilityResult: SymbolAccessibilityResult) {
if (hasModifier(node, ModifierFlags.Static)) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ?
Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
Diagnostics.Public_static_method_0_of_exported_class_has_or_is_using_private_name_1;
}
else if (node.parent.kind === SyntaxKind.ClassDeclaration) {
return symbolAccessibilityResult.errorModuleName ?
symbolAccessibilityResult.accessibility === SymbolAccessibility.CannotBeNamed ?
Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_external_module_2_but_cannot_be_named :
Diagnostics.Public_method_0_of_exported_class_has_or_is_using_name_1_from_private_module_2 :
Diagnostics.Public_method_0_of_exported_class_has_or_is_using_private_name_1;
}
else {
return symbolAccessibilityResult.errorModuleName ?
Diagnostics.Method_0_of_exported_interface_has_or_is_using_name_1_from_private_module_2 :
Diagnostics.Method_0_of_exported_interface_has_or_is_using_private_name_1;
}
}
}
function writeNameOfDeclaration(node: NamedDeclaration, getSymbolAccessibilityDiagnostic: GetSymbolAccessibilityDiagnostic) {
if (hasDynamicName(node)) {
// If this node has a dynamic name, it can only be an identifier or property access because
// we've already skipped it otherwise.
Debug.assert(resolver.isLateBound(node));
writeLateBoundNameOfDeclaration(node as LateBoundDeclaration, getSymbolAccessibilityDiagnostic);
}
else {
// If this node is a computed name, it can only be a symbol, because we've already skipped
// it if it's not a well known symbol. In that case, the text of the name will be exactly
// what we want, namely the name expression enclosed in brackets.
writeTextOfNode(currentText, node.name);
}
}
function writeLateBoundNameOfDeclaration(node: LateBoundDeclaration, getSymbolAccessibilityDiagnostic: GetSymbolAccessibilityDiagnostic) {
writer.getSymbolAccessibilityDiagnostic = getSymbolAccessibilityDiagnostic;
const entityName = node.name.expression;
const visibilityResult = resolver.isEntityNameVisible(entityName, enclosingDeclaration);
handleSymbolAccessibilityError(visibilityResult);
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForEntityName(entityName));
writeTextOfNode(currentText, node.name);
}
function emitSignatureDeclarationWithJsDocComments(node: SignatureDeclaration) {
+71 -6
View File
@@ -491,23 +491,23 @@
"category": "Error",
"code": 1164
},
"A computed property name in an ambient context must directly refer to a built-in symbol.": {
"A computed property name in an ambient context must refer to an expression whose type is a literal type or a 'unique symbol' type.": {
"category": "Error",
"code": 1165
},
"A computed property name in a class property declaration must directly refer to a built-in symbol.": {
"A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.": {
"category": "Error",
"code": 1166
},
"A computed property name in a method overload must directly refer to a built-in symbol.": {
"A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.": {
"category": "Error",
"code": 1168
},
"A computed property name in an interface must directly refer to a built-in symbol.": {
"A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.": {
"category": "Error",
"code": 1169
},
"A computed property name in a type literal must directly refer to a built-in symbol.": {
"A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.": {
"category": "Error",
"code": 1170
},
@@ -911,6 +911,30 @@
"category": "Error",
"code": 1329
},
"A property of an interface or type literal whose type is a 'unique symbol' type must be 'readonly'.": {
"category": "Error",
"code": 1330
},
"A property of a class whose type is a 'unique symbol' type must be both 'static' and 'readonly'.": {
"category": "Error",
"code": 1331
},
"A variable whose type is a 'unique symbol' type must be 'const'.": {
"category": "Error",
"code": 1332
},
"'unique symbol' types may not be used on a variable declaration with a binding name.": {
"category": "Error",
"code": 1333
},
"'unique symbol' types are only allowed on variables in a variable statement.": {
"category": "Error",
"code": 1334
},
"'unique symbol' types are not allowed here.": {
"category": "Error",
"code": 1335
},
"Duplicate identifier '{0}'.": {
"category": "Error",
@@ -1780,7 +1804,7 @@
"category": "Error",
"code": 2526
},
"The inferred type of '{0}' references an inaccessible 'this' type. A type annotation is necessary.": {
"The inferred type of '{0}' references an inaccessible '{1}' type. A type annotation is necessary.": {
"category": "Error",
"code": 2527
},
@@ -2228,6 +2252,14 @@
"category": "Error",
"code": 2716
},
"Subsequent property declarations must have the same type. Property '{0}' has type '{1}' at {2}, but here has type '{3}'.": {
"category": "Error",
"code": 2717
},
"Duplicate declaration '{0}'.": {
"category": "Error",
"code": 2718
},
"Import declaration '{0}' is using private name '{1}'.": {
"category": "Error",
@@ -2530,6 +2562,39 @@
"code": 4094
},
"Public static method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.": {
"category": "Error",
"code": 4095
},
"Public static method '{0}' of exported class has or is using name '{1}' from private module '{2}'.": {
"category": "Error",
"code": 4096
},
"Public static method '{0}' of exported class has or is using private name '{1}'.": {
"category": "Error",
"code": 4097
},
"Public method '{0}' of exported class has or is using name '{1}' from external module {2} but cannot be named.": {
"category": "Error",
"code": 4098
},
"Public method '{0}' of exported class has or is using name '{1}' from private module '{2}'.": {
"category": "Error",
"code": 4099
},
"Public method '{0}' of exported class has or is using private name '{1}'.": {
"category": "Error",
"code": 4100
},
"Method '{0}' of exported interface has or is using name '{1}' from private module '{2}'.": {
"category": "Error",
"code": 4101
},
"Method '{0}' of exported interface has or is using private name '{1}'.": {
"category": "Error",
"code": 4102
},
"The current host does not support the '{0}' option.": {
"category": "Error",
"code": 5001
+6 -4
View File
@@ -736,15 +736,17 @@ namespace ts {
return <ThisTypeNode>createSynthesizedNode(SyntaxKind.ThisType);
}
export function createTypeOperatorNode(type: TypeNode) {
export function createTypeOperatorNode(type: TypeNode): TypeOperatorNode;
export function createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword, type: TypeNode): TypeOperatorNode;
export function createTypeOperatorNode(operatorOrType: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | TypeNode, type?: TypeNode) {
const node = createSynthesizedNode(SyntaxKind.TypeOperator) as TypeOperatorNode;
node.operator = SyntaxKind.KeyOfKeyword;
node.type = parenthesizeElementTypeMember(type);
node.operator = typeof operatorOrType === "number" ? operatorOrType : SyntaxKind.KeyOfKeyword;
node.type = parenthesizeElementTypeMember(typeof operatorOrType === "number" ? type : operatorOrType);
return node;
}
export function updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode) {
return node.type !== type ? updateNode(createTypeOperatorNode(type), node) : node;
return node.type !== type ? updateNode(createTypeOperatorNode(node.operator, type), node) : node;
}
export function createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode) {
+7 -4
View File
@@ -2665,8 +2665,8 @@ namespace ts {
case SyntaxKind.AnyKeyword:
case SyntaxKind.StringKeyword:
case SyntaxKind.NumberKeyword:
case SyntaxKind.BooleanKeyword:
case SyntaxKind.SymbolKeyword:
case SyntaxKind.BooleanKeyword:
case SyntaxKind.UndefinedKeyword:
case SyntaxKind.NeverKeyword:
case SyntaxKind.ObjectKeyword:
@@ -2720,6 +2720,7 @@ namespace ts {
case SyntaxKind.NumberKeyword:
case SyntaxKind.BooleanKeyword:
case SyntaxKind.SymbolKeyword:
case SyntaxKind.UniqueKeyword:
case SyntaxKind.VoidKeyword:
case SyntaxKind.UndefinedKeyword:
case SyntaxKind.NullKeyword:
@@ -2805,7 +2806,7 @@ namespace ts {
return finishNode(postfix);
}
function parseTypeOperator(operator: SyntaxKind.KeyOfKeyword) {
function parseTypeOperator(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword) {
const node = <TypeOperatorNode>createNode(SyntaxKind.TypeOperator);
parseExpected(operator);
node.operator = operator;
@@ -2814,9 +2815,11 @@ namespace ts {
}
function parseTypeOperatorOrHigher(): TypeNode {
switch (token()) {
const operator = token();
switch (operator) {
case SyntaxKind.KeyOfKeyword:
return parseTypeOperator(SyntaxKind.KeyOfKeyword);
case SyntaxKind.UniqueKeyword:
return parseTypeOperator(operator);
case SyntaxKind.DotDotDotToken: {
const result = createNode(SyntaxKind.JSDocVariadicType) as JSDocVariadicType;
nextToken();
+1
View File
@@ -125,6 +125,7 @@ namespace ts {
"type": SyntaxKind.TypeKeyword,
"typeof": SyntaxKind.TypeOfKeyword,
"undefined": SyntaxKind.UndefinedKeyword,
"unique": SyntaxKind.UniqueKeyword,
"var": SyntaxKind.VarKeyword,
"void": SyntaxKind.VoidKeyword,
"while": SyntaxKind.WhileKeyword,
+66 -25
View File
@@ -212,6 +212,7 @@ namespace ts {
SymbolKeyword,
TypeKeyword,
UndefinedKeyword,
UniqueKeyword,
FromKeyword,
GlobalKeyword,
OfKeyword, // LastKeyword and LastToken and LastContextualKeyword
@@ -681,6 +682,17 @@ namespace ts {
name?: DeclarationName;
}
/* @internal */
export interface DynamicNamedDeclaration extends NamedDeclaration {
name: ComputedPropertyName;
}
/* @internal */
// A declaration that supports late-binding (used in checker)
export interface LateBoundDeclaration extends DynamicNamedDeclaration {
name: LateBoundName;
}
export interface DeclarationStatement extends NamedDeclaration, Statement {
name?: Identifier | StringLiteral | NumericLiteral;
}
@@ -690,6 +702,12 @@ namespace ts {
expression: Expression;
}
/* @internal */
// A name that supports late-binding (used in checker)
export interface LateBoundName extends ComputedPropertyName {
expression: EntityNameExpression;
}
export interface Decorator extends Node {
kind: SyntaxKind.Decorator;
parent?: NamedDeclaration;
@@ -1049,10 +1067,15 @@ namespace ts {
export interface TypeOperatorNode extends TypeNode {
kind: SyntaxKind.TypeOperator;
operator: SyntaxKind.KeyOfKeyword;
operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword;
type: TypeNode;
}
/* @internal */
export interface UniqueTypeOperatorNode extends TypeOperatorNode {
operator: SyntaxKind.UniqueKeyword;
}
export interface IndexedAccessTypeNode extends TypeNode {
kind: SyntaxKind.IndexedAccessType;
objectType: TypeNode;
@@ -2849,6 +2872,7 @@ namespace ts {
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
reportInaccessibleThisError(): void;
reportPrivateInBaseOfClassExpression(propertyName: string): void;
reportInaccessibleUniqueSymbolError(): void;
}
export const enum TypeFormatFlags {
@@ -2869,6 +2893,7 @@ namespace ts {
InArrayType = 1 << 15, // Writing an array element type
UseAliasDefinedOutsideCurrentScope = 1 << 16, // For a `type T = ... ` defined in a different file, write `T` instead of its value,
// even though `T` can't be accessed in the current scope.
AllowUniqueESSymbolType = 1 << 17,
}
export const enum SymbolFormatFlags {
@@ -2970,6 +2995,7 @@ namespace ts {
isTopLevelValueImportEqualsWithEntityName(node: ImportEqualsDeclaration): boolean;
getNodeCheckFlags(node: Node): NodeCheckFlags;
isDeclarationVisible(node: Declaration): boolean;
isLateBound(node: Declaration): node is LateBoundDeclaration;
collectLinkedAliases(node: Identifier): Node[];
isImplementationOfOverload(node: FunctionLikeDeclaration): boolean | undefined;
isRequiredInitializedParameter(node: ParameterDeclaration): boolean;
@@ -3077,6 +3103,9 @@ namespace ts {
// The set of things we consider semantically classifiable. Used to speed up the LS during
// classification.
Classifiable = Class | Enum | TypeAlias | Interface | TypeParameter | Module,
/* @internal */
LateBindingContainer = Class | Interface | TypeLiteral | ObjectLiteral,
}
export interface Symbol {
@@ -3108,19 +3137,21 @@ namespace ts {
instantiations?: Map<Type>; // Instantiations of generic type alias (undefined if non-generic)
mapper?: TypeMapper; // Type mapper for instantiation alias
referenced?: boolean; // True if alias symbol has been referenced as a value
containingType?: UnionOrIntersectionType; // Containing union or intersection type for synthetic property
containingType?: UnionOrIntersectionType; // Containing union or intersection type for synthetic property
leftSpread?: Symbol; // Left source for synthetic spread property
rightSpread?: Symbol; // Right source for synthetic spread property
syntheticOrigin?: Symbol; // For a property on a mapped or spread type, points back to the original property
syntheticLiteralTypeOrigin?: StringLiteralType; // For a property on a mapped type, indicates the type whose text to use as the declaration name, instead of the symbol name
isDiscriminantProperty?: boolean; // True if discriminant synthetic property
resolvedExports?: SymbolTable; // Resolved exports of module
resolvedExports?: SymbolTable; // Resolved exports of module or combined early- and late-bound static members of a class.
resolvedMembers?: SymbolTable; // Combined early- and late-bound members of a symbol
exportsChecked?: boolean; // True if exports of external module have been checked
typeParametersChecked?: boolean; // True if type parameters of merged class and interface declarations have been checked.
isDeclarationWithCollidingName?: boolean; // True if symbol is block scoped redeclaration
isDeclarationWithCollidingName?: boolean; // True if symbol is block scoped redeclaration
bindingElement?: BindingElement; // Binding element associated with property symbol
exportsSomeValue?: boolean; // True if module exports some value (not just types)
enumKind?: EnumKind; // Enum declaration classification
lateSymbol?: Symbol; // Late-bound symbol for a computed property
}
/* @internal */
@@ -3141,6 +3172,7 @@ namespace ts {
ContainsProtected = 1 << 7, // Synthetic property with protected constituent(s)
ContainsPrivate = 1 << 8, // Synthetic property with private constituent(s)
ContainsStatic = 1 << 9, // Synthetic property with static constituent(s)
Late = 1 << 10, // Late-bound symbol for a computed property with a dynamic name
Synthetic = SyntheticProperty | SyntheticMethod
}
@@ -3270,45 +3302,49 @@ namespace ts {
BooleanLiteral = 1 << 7,
EnumLiteral = 1 << 8, // Always combined with StringLiteral, NumberLiteral, or Union
ESSymbol = 1 << 9, // Type of symbol primitive introduced in ES6
Void = 1 << 10,
Undefined = 1 << 11,
Null = 1 << 12,
Never = 1 << 13, // Never type
TypeParameter = 1 << 14, // Type parameter
Object = 1 << 15, // Object type
Union = 1 << 16, // Union (T | U)
Intersection = 1 << 17, // Intersection (T & U)
Index = 1 << 18, // keyof T
IndexedAccess = 1 << 19, // T[K]
UniqueESSymbol = 1 << 10, // unique symbol
Void = 1 << 11,
Undefined = 1 << 12,
Null = 1 << 13,
Never = 1 << 14, // Never type
TypeParameter = 1 << 15, // Type parameter
Object = 1 << 16, // Object type
Union = 1 << 17, // Union (T | U)
Intersection = 1 << 18, // Intersection (T & U)
Index = 1 << 19, // keyof T
IndexedAccess = 1 << 20, // T[K]
/* @internal */
FreshLiteral = 1 << 20, // Fresh literal type
FreshLiteral = 1 << 21, // Fresh literal or unique type
/* @internal */
ContainsWideningType = 1 << 21, // Type is or contains undefined or null widening type
ContainsWideningType = 1 << 22, // Type is or contains undefined or null widening type
/* @internal */
ContainsObjectLiteral = 1 << 22, // Type is or contains object literal type
ContainsObjectLiteral = 1 << 23, // Type is or contains object literal type
/* @internal */
ContainsAnyFunctionType = 1 << 23, // Type is or contains the anyFunctionType
NonPrimitive = 1 << 24, // intrinsic object type
ContainsAnyFunctionType = 1 << 24, // Type is or contains the anyFunctionType
NonPrimitive = 1 << 25, // intrinsic object type
/* @internal */
JsxAttributes = 1 << 25, // Jsx attributes type
MarkerType = 1 << 26, // Marker type used for variance probing
JsxAttributes = 1 << 26, // Jsx attributes type
MarkerType = 1 << 27, // Marker type used for variance probing
/* @internal */
Nullable = Undefined | Null,
Literal = StringLiteral | NumberLiteral | BooleanLiteral,
Unit = Literal | Nullable,
Unit = Literal | UniqueESSymbol | Nullable,
StringOrNumberLiteral = StringLiteral | NumberLiteral,
/* @internal */
StringOrNumberLiteralOrUnique = StringOrNumberLiteral | UniqueESSymbol,
/* @internal */
DefinitelyFalsy = StringLiteral | NumberLiteral | BooleanLiteral | Void | Undefined | Null,
PossiblyFalsy = DefinitelyFalsy | String | Number | Boolean,
/* @internal */
Intrinsic = Any | String | Number | Boolean | BooleanLiteral | ESSymbol | Void | Undefined | Null | Never | NonPrimitive,
/* @internal */
Primitive = String | Number | Boolean | Enum | EnumLiteral | ESSymbol | Void | Undefined | Null | Literal,
Primitive = String | Number | Boolean | Enum | EnumLiteral | ESSymbol | Void | Undefined | Null | Literal | UniqueESSymbol,
StringLike = String | StringLiteral | Index,
NumberLike = Number | NumberLiteral | Enum,
BooleanLike = Boolean | BooleanLiteral,
EnumLike = Enum | EnumLiteral,
ESSymbolLike = ESSymbol | UniqueESSymbol,
UnionOrIntersection = Union | Intersection,
StructuredType = Object | Union | Intersection,
StructuredOrTypeVariable = StructuredType | TypeParameter | Index | IndexedAccess,
@@ -3316,12 +3352,12 @@ namespace ts {
// 'Narrowable' types are types where narrowing actually narrows.
// This *should* be every type other than null, undefined, void, and never
Narrowable = Any | StructuredType | TypeParameter | Index | IndexedAccess | StringLike | NumberLike | BooleanLike | ESSymbol | NonPrimitive,
Narrowable = Any | StructuredType | TypeParameter | Index | IndexedAccess | StringLike | NumberLike | BooleanLike | ESSymbol | UniqueESSymbol | NonPrimitive,
NotUnionOrUnit = Any | ESSymbol | Object | NonPrimitive,
/* @internal */
RequiresWidening = ContainsWideningType | ContainsObjectLiteral,
/* @internal */
PropagatingFlags = ContainsWideningType | ContainsObjectLiteral | ContainsAnyFunctionType
PropagatingFlags = ContainsWideningType | ContainsObjectLiteral | ContainsAnyFunctionType,
}
export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
@@ -3351,6 +3387,11 @@ namespace ts {
regularType?: LiteralType; // Regular version of type
}
// Unique symbol types (TypeFlags.UniqueESSymbol)
export interface UniqueESSymbolType extends Type {
symbol: Symbol;
}
export interface StringLiteralType extends LiteralType {
value: string;
}
+49 -5
View File
@@ -56,6 +56,7 @@ namespace ts {
clear: () => str = "",
trackSymbol: noop,
reportInaccessibleThisError: noop,
reportInaccessibleUniqueSymbolError: noop,
reportPrivateInBaseOfClassExpression: noop,
};
}
@@ -913,6 +914,18 @@ namespace ts {
}
}
export function getMembersOfDeclaration(node: Declaration): NodeArray<ClassElement | TypeElement | ObjectLiteralElement> | undefined {
switch (node.kind) {
case SyntaxKind.InterfaceDeclaration:
case SyntaxKind.ClassDeclaration:
case SyntaxKind.ClassExpression:
case SyntaxKind.TypeLiteral:
return (<ClassLikeDeclaration | InterfaceDeclaration | TypeLiteralNode>node).members;
case SyntaxKind.ObjectLiteralExpression:
return (<ObjectLiteralExpression>node).properties;
}
}
export function isVariableLike(node: Node): node is VariableLikeDeclaration {
if (node) {
switch (node.kind) {
@@ -930,6 +943,17 @@ namespace ts {
return false;
}
export function isVariableDeclarationInVariableStatement(node: VariableDeclaration) {
return node.parent.kind === SyntaxKind.VariableDeclarationList
&& node.parent.parent.kind === SyntaxKind.VariableStatement;
}
export function isValidESSymbolDeclaration(node: Node) {
return isVariableDeclaration(node) ? isConst(node) && isIdentifier(node.name) && isVariableDeclarationInVariableStatement(node) :
isPropertyDeclaration(node) ? hasReadonlyModifier(node) && hasStaticModifier(node) :
isPropertySignature(node) && hasReadonlyModifier(node);
}
export function introducesArgumentsExoticObject(node: Node) {
switch (node.kind) {
case SyntaxKind.MethodDeclaration:
@@ -1716,15 +1740,27 @@ namespace ts {
return getAssignmentTargetKind(node) !== AssignmentKind.None;
}
function walkUp(node: Node, kind: SyntaxKind) {
while (node && node.kind === kind) {
node = node.parent;
}
return node;
}
export function walkUpParenthesizedTypes(node: Node) {
return walkUp(node, SyntaxKind.ParenthesizedType);
}
export function walkUpParenthesizedExpressions(node: Node) {
return walkUp(node, SyntaxKind.ParenthesizedExpression);
}
// a node is delete target iff. it is PropertyAccessExpression/ElementAccessExpression with parentheses skipped
export function isDeleteTarget(node: Node): boolean {
if (node.kind !== SyntaxKind.PropertyAccessExpression && node.kind !== SyntaxKind.ElementAccessExpression) {
return false;
}
node = node.parent;
while (node && node.kind === SyntaxKind.ParenthesizedExpression) {
node = node.parent;
}
node = walkUpParenthesizedExpressions(node.parent);
return node && node.kind === SyntaxKind.DeleteExpression;
}
@@ -1985,7 +2021,7 @@ namespace ts {
* is a property of the Symbol constructor that denotes a built in
* Symbol.
*/
export function hasDynamicName(declaration: Declaration): boolean {
export function hasDynamicName(declaration: Declaration): declaration is DynamicNamedDeclaration {
const name = getNameOfDeclaration(declaration);
return name && isDynamicName(name);
}
@@ -3031,6 +3067,14 @@ namespace ts {
return !!getSelectedModifierFlags(node, flags);
}
export function hasStaticModifier(node: Node): boolean {
return hasModifier(node, ModifierFlags.Static);
}
export function hasReadonlyModifier(node: Node): boolean {
return hasModifier(node, ModifierFlags.Readonly);
}
export function getSelectedModifierFlags(node: Node, flags: ModifierFlags): ModifierFlags {
return getModifierFlags(node) & flags;
}
+1
View File
@@ -246,6 +246,7 @@ namespace ts.codefix {
},
reportInaccessibleThisError: () => { typeIsAccessible = false; },
reportPrivateInBaseOfClassExpression: () => { typeIsAccessible = false; },
reportInaccessibleUniqueSymbolError: () => { typeIsAccessible = false; }
};
}
writer.clear();
+1
View File
@@ -1131,6 +1131,7 @@ namespace ts {
clear: resetWriter,
trackSymbol: noop,
reportInaccessibleThisError: noop,
reportInaccessibleUniqueSymbolError: noop,
reportPrivateInBaseOfClassExpression: noop,
};
@@ -1,6 +1,6 @@
=== tests/cases/conformance/es6/yieldExpressions/YieldStarExpression4_es6.ts ===
function *g() {
>g : () => IterableIterator<undefined>
>g : () => IterableIterator<any>
yield * [];
>yield * [] : any
+196 -187
View File
@@ -200,162 +200,163 @@ declare namespace ts {
SymbolKeyword = 137,
TypeKeyword = 138,
UndefinedKeyword = 139,
FromKeyword = 140,
GlobalKeyword = 141,
OfKeyword = 142,
QualifiedName = 143,
ComputedPropertyName = 144,
TypeParameter = 145,
Parameter = 146,
Decorator = 147,
PropertySignature = 148,
PropertyDeclaration = 149,
MethodSignature = 150,
MethodDeclaration = 151,
Constructor = 152,
GetAccessor = 153,
SetAccessor = 154,
CallSignature = 155,
ConstructSignature = 156,
IndexSignature = 157,
TypePredicate = 158,
TypeReference = 159,
FunctionType = 160,
ConstructorType = 161,
TypeQuery = 162,
TypeLiteral = 163,
ArrayType = 164,
TupleType = 165,
UnionType = 166,
IntersectionType = 167,
ParenthesizedType = 168,
ThisType = 169,
TypeOperator = 170,
IndexedAccessType = 171,
MappedType = 172,
LiteralType = 173,
ObjectBindingPattern = 174,
ArrayBindingPattern = 175,
BindingElement = 176,
ArrayLiteralExpression = 177,
ObjectLiteralExpression = 178,
PropertyAccessExpression = 179,
ElementAccessExpression = 180,
CallExpression = 181,
NewExpression = 182,
TaggedTemplateExpression = 183,
TypeAssertionExpression = 184,
ParenthesizedExpression = 185,
FunctionExpression = 186,
ArrowFunction = 187,
DeleteExpression = 188,
TypeOfExpression = 189,
VoidExpression = 190,
AwaitExpression = 191,
PrefixUnaryExpression = 192,
PostfixUnaryExpression = 193,
BinaryExpression = 194,
ConditionalExpression = 195,
TemplateExpression = 196,
YieldExpression = 197,
SpreadElement = 198,
ClassExpression = 199,
OmittedExpression = 200,
ExpressionWithTypeArguments = 201,
AsExpression = 202,
NonNullExpression = 203,
MetaProperty = 204,
TemplateSpan = 205,
SemicolonClassElement = 206,
Block = 207,
VariableStatement = 208,
EmptyStatement = 209,
ExpressionStatement = 210,
IfStatement = 211,
DoStatement = 212,
WhileStatement = 213,
ForStatement = 214,
ForInStatement = 215,
ForOfStatement = 216,
ContinueStatement = 217,
BreakStatement = 218,
ReturnStatement = 219,
WithStatement = 220,
SwitchStatement = 221,
LabeledStatement = 222,
ThrowStatement = 223,
TryStatement = 224,
DebuggerStatement = 225,
VariableDeclaration = 226,
VariableDeclarationList = 227,
FunctionDeclaration = 228,
ClassDeclaration = 229,
InterfaceDeclaration = 230,
TypeAliasDeclaration = 231,
EnumDeclaration = 232,
ModuleDeclaration = 233,
ModuleBlock = 234,
CaseBlock = 235,
NamespaceExportDeclaration = 236,
ImportEqualsDeclaration = 237,
ImportDeclaration = 238,
ImportClause = 239,
NamespaceImport = 240,
NamedImports = 241,
ImportSpecifier = 242,
ExportAssignment = 243,
ExportDeclaration = 244,
NamedExports = 245,
ExportSpecifier = 246,
MissingDeclaration = 247,
ExternalModuleReference = 248,
JsxElement = 249,
JsxSelfClosingElement = 250,
JsxOpeningElement = 251,
JsxClosingElement = 252,
JsxFragment = 253,
JsxOpeningFragment = 254,
JsxClosingFragment = 255,
JsxAttribute = 256,
JsxAttributes = 257,
JsxSpreadAttribute = 258,
JsxExpression = 259,
CaseClause = 260,
DefaultClause = 261,
HeritageClause = 262,
CatchClause = 263,
PropertyAssignment = 264,
ShorthandPropertyAssignment = 265,
SpreadAssignment = 266,
EnumMember = 267,
SourceFile = 268,
Bundle = 269,
JSDocTypeExpression = 270,
JSDocAllType = 271,
JSDocUnknownType = 272,
JSDocNullableType = 273,
JSDocNonNullableType = 274,
JSDocOptionalType = 275,
JSDocFunctionType = 276,
JSDocVariadicType = 277,
JSDocComment = 278,
JSDocTypeLiteral = 279,
JSDocTag = 280,
JSDocAugmentsTag = 281,
JSDocClassTag = 282,
JSDocParameterTag = 283,
JSDocReturnTag = 284,
JSDocTypeTag = 285,
JSDocTemplateTag = 286,
JSDocTypedefTag = 287,
JSDocPropertyTag = 288,
SyntaxList = 289,
NotEmittedStatement = 290,
PartiallyEmittedExpression = 291,
CommaListExpression = 292,
MergeDeclarationMarker = 293,
EndOfDeclarationMarker = 294,
Count = 295,
UniqueKeyword = 140,
FromKeyword = 141,
GlobalKeyword = 142,
OfKeyword = 143,
QualifiedName = 144,
ComputedPropertyName = 145,
TypeParameter = 146,
Parameter = 147,
Decorator = 148,
PropertySignature = 149,
PropertyDeclaration = 150,
MethodSignature = 151,
MethodDeclaration = 152,
Constructor = 153,
GetAccessor = 154,
SetAccessor = 155,
CallSignature = 156,
ConstructSignature = 157,
IndexSignature = 158,
TypePredicate = 159,
TypeReference = 160,
FunctionType = 161,
ConstructorType = 162,
TypeQuery = 163,
TypeLiteral = 164,
ArrayType = 165,
TupleType = 166,
UnionType = 167,
IntersectionType = 168,
ParenthesizedType = 169,
ThisType = 170,
TypeOperator = 171,
IndexedAccessType = 172,
MappedType = 173,
LiteralType = 174,
ObjectBindingPattern = 175,
ArrayBindingPattern = 176,
BindingElement = 177,
ArrayLiteralExpression = 178,
ObjectLiteralExpression = 179,
PropertyAccessExpression = 180,
ElementAccessExpression = 181,
CallExpression = 182,
NewExpression = 183,
TaggedTemplateExpression = 184,
TypeAssertionExpression = 185,
ParenthesizedExpression = 186,
FunctionExpression = 187,
ArrowFunction = 188,
DeleteExpression = 189,
TypeOfExpression = 190,
VoidExpression = 191,
AwaitExpression = 192,
PrefixUnaryExpression = 193,
PostfixUnaryExpression = 194,
BinaryExpression = 195,
ConditionalExpression = 196,
TemplateExpression = 197,
YieldExpression = 198,
SpreadElement = 199,
ClassExpression = 200,
OmittedExpression = 201,
ExpressionWithTypeArguments = 202,
AsExpression = 203,
NonNullExpression = 204,
MetaProperty = 205,
TemplateSpan = 206,
SemicolonClassElement = 207,
Block = 208,
VariableStatement = 209,
EmptyStatement = 210,
ExpressionStatement = 211,
IfStatement = 212,
DoStatement = 213,
WhileStatement = 214,
ForStatement = 215,
ForInStatement = 216,
ForOfStatement = 217,
ContinueStatement = 218,
BreakStatement = 219,
ReturnStatement = 220,
WithStatement = 221,
SwitchStatement = 222,
LabeledStatement = 223,
ThrowStatement = 224,
TryStatement = 225,
DebuggerStatement = 226,
VariableDeclaration = 227,
VariableDeclarationList = 228,
FunctionDeclaration = 229,
ClassDeclaration = 230,
InterfaceDeclaration = 231,
TypeAliasDeclaration = 232,
EnumDeclaration = 233,
ModuleDeclaration = 234,
ModuleBlock = 235,
CaseBlock = 236,
NamespaceExportDeclaration = 237,
ImportEqualsDeclaration = 238,
ImportDeclaration = 239,
ImportClause = 240,
NamespaceImport = 241,
NamedImports = 242,
ImportSpecifier = 243,
ExportAssignment = 244,
ExportDeclaration = 245,
NamedExports = 246,
ExportSpecifier = 247,
MissingDeclaration = 248,
ExternalModuleReference = 249,
JsxElement = 250,
JsxSelfClosingElement = 251,
JsxOpeningElement = 252,
JsxClosingElement = 253,
JsxFragment = 254,
JsxOpeningFragment = 255,
JsxClosingFragment = 256,
JsxAttribute = 257,
JsxAttributes = 258,
JsxSpreadAttribute = 259,
JsxExpression = 260,
CaseClause = 261,
DefaultClause = 262,
HeritageClause = 263,
CatchClause = 264,
PropertyAssignment = 265,
ShorthandPropertyAssignment = 266,
SpreadAssignment = 267,
EnumMember = 268,
SourceFile = 269,
Bundle = 270,
JSDocTypeExpression = 271,
JSDocAllType = 272,
JSDocUnknownType = 273,
JSDocNullableType = 274,
JSDocNonNullableType = 275,
JSDocOptionalType = 276,
JSDocFunctionType = 277,
JSDocVariadicType = 278,
JSDocComment = 279,
JSDocTypeLiteral = 280,
JSDocTag = 281,
JSDocAugmentsTag = 282,
JSDocClassTag = 283,
JSDocParameterTag = 284,
JSDocReturnTag = 285,
JSDocTypeTag = 286,
JSDocTemplateTag = 287,
JSDocTypedefTag = 288,
JSDocPropertyTag = 289,
SyntaxList = 290,
NotEmittedStatement = 291,
PartiallyEmittedExpression = 292,
CommaListExpression = 293,
MergeDeclarationMarker = 294,
EndOfDeclarationMarker = 295,
Count = 296,
FirstAssignment = 58,
LastAssignment = 70,
FirstCompoundAssignment = 59,
@@ -363,15 +364,15 @@ declare namespace ts {
FirstReservedWord = 72,
LastReservedWord = 107,
FirstKeyword = 72,
LastKeyword = 142,
LastKeyword = 143,
FirstFutureReservedWord = 108,
LastFutureReservedWord = 116,
FirstTypeNode = 158,
LastTypeNode = 173,
FirstTypeNode = 159,
LastTypeNode = 174,
FirstPunctuation = 17,
LastPunctuation = 70,
FirstToken = 0,
LastToken = 142,
LastToken = 143,
FirstTriviaToken = 2,
LastTriviaToken = 7,
FirstLiteralToken = 8,
@@ -380,11 +381,11 @@ declare namespace ts {
LastTemplateToken = 16,
FirstBinaryOperator = 27,
LastBinaryOperator = 70,
FirstNode = 143,
FirstJSDocNode = 270,
LastJSDocNode = 288,
FirstJSDocTagNode = 280,
LastJSDocTagNode = 288,
FirstNode = 144,
FirstJSDocNode = 271,
LastJSDocNode = 289,
FirstJSDocTagNode = 281,
LastJSDocTagNode = 289,
}
enum NodeFlags {
None = 0,
@@ -739,7 +740,7 @@ declare namespace ts {
}
interface TypeOperatorNode extends TypeNode {
kind: SyntaxKind.TypeOperator;
operator: SyntaxKind.KeyOfKeyword;
operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword;
type: TypeNode;
}
interface IndexedAccessTypeNode extends TypeNode {
@@ -1825,6 +1826,7 @@ declare namespace ts {
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
reportInaccessibleThisError(): void;
reportPrivateInBaseOfClassExpression(propertyName: string): void;
reportInaccessibleUniqueSymbolError(): void;
}
enum TypeFormatFlags {
None = 0,
@@ -1843,6 +1845,7 @@ declare namespace ts {
WriteClassExpressionAsTypeLiteral = 16384,
InArrayType = 32768,
UseAliasDefinedOutsideCurrentScope = 65536,
AllowUniqueESSymbolType = 131072,
}
enum SymbolFormatFlags {
None = 0,
@@ -1996,32 +1999,34 @@ declare namespace ts {
BooleanLiteral = 128,
EnumLiteral = 256,
ESSymbol = 512,
Void = 1024,
Undefined = 2048,
Null = 4096,
Never = 8192,
TypeParameter = 16384,
Object = 32768,
Union = 65536,
Intersection = 131072,
Index = 262144,
IndexedAccess = 524288,
NonPrimitive = 16777216,
MarkerType = 67108864,
UniqueESSymbol = 1024,
Void = 2048,
Undefined = 4096,
Null = 8192,
Never = 16384,
TypeParameter = 32768,
Object = 65536,
Union = 131072,
Intersection = 262144,
Index = 524288,
IndexedAccess = 1048576,
NonPrimitive = 33554432,
MarkerType = 134217728,
Literal = 224,
Unit = 6368,
Unit = 13536,
StringOrNumberLiteral = 96,
PossiblyFalsy = 7406,
StringLike = 262178,
PossiblyFalsy = 14574,
StringLike = 524322,
NumberLike = 84,
BooleanLike = 136,
EnumLike = 272,
UnionOrIntersection = 196608,
StructuredType = 229376,
StructuredOrTypeVariable = 1032192,
TypeVariable = 540672,
Narrowable = 17810175,
NotUnionOrUnit = 16810497,
ESSymbolLike = 1536,
UnionOrIntersection = 393216,
StructuredType = 458752,
StructuredOrTypeVariable = 2064384,
TypeVariable = 1081344,
Narrowable = 35620607,
NotUnionOrUnit = 33620481,
}
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
interface Type {
@@ -2036,6 +2041,9 @@ declare namespace ts {
freshType?: LiteralType;
regularType?: LiteralType;
}
interface UniqueESSymbolType extends Type {
symbol: Symbol;
}
interface StringLiteralType extends LiteralType {
value: string;
}
@@ -3350,6 +3358,7 @@ declare namespace ts {
function updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
function createThisTypeNode(): ThisTypeNode;
function createTypeOperatorNode(type: TypeNode): TypeOperatorNode;
function createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword, type: TypeNode): TypeOperatorNode;
function updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode;
function createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
function updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
+196 -187
View File
@@ -200,162 +200,163 @@ declare namespace ts {
SymbolKeyword = 137,
TypeKeyword = 138,
UndefinedKeyword = 139,
FromKeyword = 140,
GlobalKeyword = 141,
OfKeyword = 142,
QualifiedName = 143,
ComputedPropertyName = 144,
TypeParameter = 145,
Parameter = 146,
Decorator = 147,
PropertySignature = 148,
PropertyDeclaration = 149,
MethodSignature = 150,
MethodDeclaration = 151,
Constructor = 152,
GetAccessor = 153,
SetAccessor = 154,
CallSignature = 155,
ConstructSignature = 156,
IndexSignature = 157,
TypePredicate = 158,
TypeReference = 159,
FunctionType = 160,
ConstructorType = 161,
TypeQuery = 162,
TypeLiteral = 163,
ArrayType = 164,
TupleType = 165,
UnionType = 166,
IntersectionType = 167,
ParenthesizedType = 168,
ThisType = 169,
TypeOperator = 170,
IndexedAccessType = 171,
MappedType = 172,
LiteralType = 173,
ObjectBindingPattern = 174,
ArrayBindingPattern = 175,
BindingElement = 176,
ArrayLiteralExpression = 177,
ObjectLiteralExpression = 178,
PropertyAccessExpression = 179,
ElementAccessExpression = 180,
CallExpression = 181,
NewExpression = 182,
TaggedTemplateExpression = 183,
TypeAssertionExpression = 184,
ParenthesizedExpression = 185,
FunctionExpression = 186,
ArrowFunction = 187,
DeleteExpression = 188,
TypeOfExpression = 189,
VoidExpression = 190,
AwaitExpression = 191,
PrefixUnaryExpression = 192,
PostfixUnaryExpression = 193,
BinaryExpression = 194,
ConditionalExpression = 195,
TemplateExpression = 196,
YieldExpression = 197,
SpreadElement = 198,
ClassExpression = 199,
OmittedExpression = 200,
ExpressionWithTypeArguments = 201,
AsExpression = 202,
NonNullExpression = 203,
MetaProperty = 204,
TemplateSpan = 205,
SemicolonClassElement = 206,
Block = 207,
VariableStatement = 208,
EmptyStatement = 209,
ExpressionStatement = 210,
IfStatement = 211,
DoStatement = 212,
WhileStatement = 213,
ForStatement = 214,
ForInStatement = 215,
ForOfStatement = 216,
ContinueStatement = 217,
BreakStatement = 218,
ReturnStatement = 219,
WithStatement = 220,
SwitchStatement = 221,
LabeledStatement = 222,
ThrowStatement = 223,
TryStatement = 224,
DebuggerStatement = 225,
VariableDeclaration = 226,
VariableDeclarationList = 227,
FunctionDeclaration = 228,
ClassDeclaration = 229,
InterfaceDeclaration = 230,
TypeAliasDeclaration = 231,
EnumDeclaration = 232,
ModuleDeclaration = 233,
ModuleBlock = 234,
CaseBlock = 235,
NamespaceExportDeclaration = 236,
ImportEqualsDeclaration = 237,
ImportDeclaration = 238,
ImportClause = 239,
NamespaceImport = 240,
NamedImports = 241,
ImportSpecifier = 242,
ExportAssignment = 243,
ExportDeclaration = 244,
NamedExports = 245,
ExportSpecifier = 246,
MissingDeclaration = 247,
ExternalModuleReference = 248,
JsxElement = 249,
JsxSelfClosingElement = 250,
JsxOpeningElement = 251,
JsxClosingElement = 252,
JsxFragment = 253,
JsxOpeningFragment = 254,
JsxClosingFragment = 255,
JsxAttribute = 256,
JsxAttributes = 257,
JsxSpreadAttribute = 258,
JsxExpression = 259,
CaseClause = 260,
DefaultClause = 261,
HeritageClause = 262,
CatchClause = 263,
PropertyAssignment = 264,
ShorthandPropertyAssignment = 265,
SpreadAssignment = 266,
EnumMember = 267,
SourceFile = 268,
Bundle = 269,
JSDocTypeExpression = 270,
JSDocAllType = 271,
JSDocUnknownType = 272,
JSDocNullableType = 273,
JSDocNonNullableType = 274,
JSDocOptionalType = 275,
JSDocFunctionType = 276,
JSDocVariadicType = 277,
JSDocComment = 278,
JSDocTypeLiteral = 279,
JSDocTag = 280,
JSDocAugmentsTag = 281,
JSDocClassTag = 282,
JSDocParameterTag = 283,
JSDocReturnTag = 284,
JSDocTypeTag = 285,
JSDocTemplateTag = 286,
JSDocTypedefTag = 287,
JSDocPropertyTag = 288,
SyntaxList = 289,
NotEmittedStatement = 290,
PartiallyEmittedExpression = 291,
CommaListExpression = 292,
MergeDeclarationMarker = 293,
EndOfDeclarationMarker = 294,
Count = 295,
UniqueKeyword = 140,
FromKeyword = 141,
GlobalKeyword = 142,
OfKeyword = 143,
QualifiedName = 144,
ComputedPropertyName = 145,
TypeParameter = 146,
Parameter = 147,
Decorator = 148,
PropertySignature = 149,
PropertyDeclaration = 150,
MethodSignature = 151,
MethodDeclaration = 152,
Constructor = 153,
GetAccessor = 154,
SetAccessor = 155,
CallSignature = 156,
ConstructSignature = 157,
IndexSignature = 158,
TypePredicate = 159,
TypeReference = 160,
FunctionType = 161,
ConstructorType = 162,
TypeQuery = 163,
TypeLiteral = 164,
ArrayType = 165,
TupleType = 166,
UnionType = 167,
IntersectionType = 168,
ParenthesizedType = 169,
ThisType = 170,
TypeOperator = 171,
IndexedAccessType = 172,
MappedType = 173,
LiteralType = 174,
ObjectBindingPattern = 175,
ArrayBindingPattern = 176,
BindingElement = 177,
ArrayLiteralExpression = 178,
ObjectLiteralExpression = 179,
PropertyAccessExpression = 180,
ElementAccessExpression = 181,
CallExpression = 182,
NewExpression = 183,
TaggedTemplateExpression = 184,
TypeAssertionExpression = 185,
ParenthesizedExpression = 186,
FunctionExpression = 187,
ArrowFunction = 188,
DeleteExpression = 189,
TypeOfExpression = 190,
VoidExpression = 191,
AwaitExpression = 192,
PrefixUnaryExpression = 193,
PostfixUnaryExpression = 194,
BinaryExpression = 195,
ConditionalExpression = 196,
TemplateExpression = 197,
YieldExpression = 198,
SpreadElement = 199,
ClassExpression = 200,
OmittedExpression = 201,
ExpressionWithTypeArguments = 202,
AsExpression = 203,
NonNullExpression = 204,
MetaProperty = 205,
TemplateSpan = 206,
SemicolonClassElement = 207,
Block = 208,
VariableStatement = 209,
EmptyStatement = 210,
ExpressionStatement = 211,
IfStatement = 212,
DoStatement = 213,
WhileStatement = 214,
ForStatement = 215,
ForInStatement = 216,
ForOfStatement = 217,
ContinueStatement = 218,
BreakStatement = 219,
ReturnStatement = 220,
WithStatement = 221,
SwitchStatement = 222,
LabeledStatement = 223,
ThrowStatement = 224,
TryStatement = 225,
DebuggerStatement = 226,
VariableDeclaration = 227,
VariableDeclarationList = 228,
FunctionDeclaration = 229,
ClassDeclaration = 230,
InterfaceDeclaration = 231,
TypeAliasDeclaration = 232,
EnumDeclaration = 233,
ModuleDeclaration = 234,
ModuleBlock = 235,
CaseBlock = 236,
NamespaceExportDeclaration = 237,
ImportEqualsDeclaration = 238,
ImportDeclaration = 239,
ImportClause = 240,
NamespaceImport = 241,
NamedImports = 242,
ImportSpecifier = 243,
ExportAssignment = 244,
ExportDeclaration = 245,
NamedExports = 246,
ExportSpecifier = 247,
MissingDeclaration = 248,
ExternalModuleReference = 249,
JsxElement = 250,
JsxSelfClosingElement = 251,
JsxOpeningElement = 252,
JsxClosingElement = 253,
JsxFragment = 254,
JsxOpeningFragment = 255,
JsxClosingFragment = 256,
JsxAttribute = 257,
JsxAttributes = 258,
JsxSpreadAttribute = 259,
JsxExpression = 260,
CaseClause = 261,
DefaultClause = 262,
HeritageClause = 263,
CatchClause = 264,
PropertyAssignment = 265,
ShorthandPropertyAssignment = 266,
SpreadAssignment = 267,
EnumMember = 268,
SourceFile = 269,
Bundle = 270,
JSDocTypeExpression = 271,
JSDocAllType = 272,
JSDocUnknownType = 273,
JSDocNullableType = 274,
JSDocNonNullableType = 275,
JSDocOptionalType = 276,
JSDocFunctionType = 277,
JSDocVariadicType = 278,
JSDocComment = 279,
JSDocTypeLiteral = 280,
JSDocTag = 281,
JSDocAugmentsTag = 282,
JSDocClassTag = 283,
JSDocParameterTag = 284,
JSDocReturnTag = 285,
JSDocTypeTag = 286,
JSDocTemplateTag = 287,
JSDocTypedefTag = 288,
JSDocPropertyTag = 289,
SyntaxList = 290,
NotEmittedStatement = 291,
PartiallyEmittedExpression = 292,
CommaListExpression = 293,
MergeDeclarationMarker = 294,
EndOfDeclarationMarker = 295,
Count = 296,
FirstAssignment = 58,
LastAssignment = 70,
FirstCompoundAssignment = 59,
@@ -363,15 +364,15 @@ declare namespace ts {
FirstReservedWord = 72,
LastReservedWord = 107,
FirstKeyword = 72,
LastKeyword = 142,
LastKeyword = 143,
FirstFutureReservedWord = 108,
LastFutureReservedWord = 116,
FirstTypeNode = 158,
LastTypeNode = 173,
FirstTypeNode = 159,
LastTypeNode = 174,
FirstPunctuation = 17,
LastPunctuation = 70,
FirstToken = 0,
LastToken = 142,
LastToken = 143,
FirstTriviaToken = 2,
LastTriviaToken = 7,
FirstLiteralToken = 8,
@@ -380,11 +381,11 @@ declare namespace ts {
LastTemplateToken = 16,
FirstBinaryOperator = 27,
LastBinaryOperator = 70,
FirstNode = 143,
FirstJSDocNode = 270,
LastJSDocNode = 288,
FirstJSDocTagNode = 280,
LastJSDocTagNode = 288,
FirstNode = 144,
FirstJSDocNode = 271,
LastJSDocNode = 289,
FirstJSDocTagNode = 281,
LastJSDocTagNode = 289,
}
enum NodeFlags {
None = 0,
@@ -739,7 +740,7 @@ declare namespace ts {
}
interface TypeOperatorNode extends TypeNode {
kind: SyntaxKind.TypeOperator;
operator: SyntaxKind.KeyOfKeyword;
operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword;
type: TypeNode;
}
interface IndexedAccessTypeNode extends TypeNode {
@@ -1825,6 +1826,7 @@ declare namespace ts {
trackSymbol(symbol: Symbol, enclosingDeclaration?: Node, meaning?: SymbolFlags): void;
reportInaccessibleThisError(): void;
reportPrivateInBaseOfClassExpression(propertyName: string): void;
reportInaccessibleUniqueSymbolError(): void;
}
enum TypeFormatFlags {
None = 0,
@@ -1843,6 +1845,7 @@ declare namespace ts {
WriteClassExpressionAsTypeLiteral = 16384,
InArrayType = 32768,
UseAliasDefinedOutsideCurrentScope = 65536,
AllowUniqueESSymbolType = 131072,
}
enum SymbolFormatFlags {
None = 0,
@@ -1996,32 +1999,34 @@ declare namespace ts {
BooleanLiteral = 128,
EnumLiteral = 256,
ESSymbol = 512,
Void = 1024,
Undefined = 2048,
Null = 4096,
Never = 8192,
TypeParameter = 16384,
Object = 32768,
Union = 65536,
Intersection = 131072,
Index = 262144,
IndexedAccess = 524288,
NonPrimitive = 16777216,
MarkerType = 67108864,
UniqueESSymbol = 1024,
Void = 2048,
Undefined = 4096,
Null = 8192,
Never = 16384,
TypeParameter = 32768,
Object = 65536,
Union = 131072,
Intersection = 262144,
Index = 524288,
IndexedAccess = 1048576,
NonPrimitive = 33554432,
MarkerType = 134217728,
Literal = 224,
Unit = 6368,
Unit = 13536,
StringOrNumberLiteral = 96,
PossiblyFalsy = 7406,
StringLike = 262178,
PossiblyFalsy = 14574,
StringLike = 524322,
NumberLike = 84,
BooleanLike = 136,
EnumLike = 272,
UnionOrIntersection = 196608,
StructuredType = 229376,
StructuredOrTypeVariable = 1032192,
TypeVariable = 540672,
Narrowable = 17810175,
NotUnionOrUnit = 16810497,
ESSymbolLike = 1536,
UnionOrIntersection = 393216,
StructuredType = 458752,
StructuredOrTypeVariable = 2064384,
TypeVariable = 1081344,
Narrowable = 35620607,
NotUnionOrUnit = 33620481,
}
type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression;
interface Type {
@@ -2036,6 +2041,9 @@ declare namespace ts {
freshType?: LiteralType;
regularType?: LiteralType;
}
interface UniqueESSymbolType extends Type {
symbol: Symbol;
}
interface StringLiteralType extends LiteralType {
value: string;
}
@@ -3297,6 +3305,7 @@ declare namespace ts {
function updateParenthesizedType(node: ParenthesizedTypeNode, type: TypeNode): ParenthesizedTypeNode;
function createThisTypeNode(): ThisTypeNode;
function createTypeOperatorNode(type: TypeNode): TypeOperatorNode;
function createTypeOperatorNode(operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword, type: TypeNode): TypeOperatorNode;
function updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode;
function createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
function updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode;
@@ -1,6 +1,6 @@
=== tests/cases/compiler/asyncImportNestedYield.ts ===
async function* foo() {
>foo : () => AsyncIterableIterator<"foo">
>foo : () => AsyncIterableIterator<string>
import((await import(yield "foo")).default);
>import((await import(yield "foo")).default) : Promise<any>
@@ -1,5 +1,5 @@
tests/cases/compiler/capturedParametersInInitializers2.ts(1,36): error TS2373: Initializer of parameter 'y' cannot reference identifier 'x' declared after it.
tests/cases/compiler/capturedParametersInInitializers2.ts(4,26): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/capturedParametersInInitializers2.ts(4,26): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
==== tests/cases/compiler/capturedParametersInInitializers2.ts (2 errors) ====
@@ -10,5 +10,5 @@ tests/cases/compiler/capturedParametersInInitializers2.ts(4,26): error TS1166: A
}
function foo2(y = class {[x] = x}, x = 1) {
~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
}
@@ -2,7 +2,7 @@ tests/cases/compiler/classWithDuplicateIdentifier.ts(3,5): error TS2300: Duplica
tests/cases/compiler/classWithDuplicateIdentifier.ts(6,5): error TS2300: Duplicate identifier 'b'.
tests/cases/compiler/classWithDuplicateIdentifier.ts(7,5): error TS2300: Duplicate identifier 'b'.
tests/cases/compiler/classWithDuplicateIdentifier.ts(11,5): error TS2300: Duplicate identifier 'c'.
tests/cases/compiler/classWithDuplicateIdentifier.ts(11,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'c' has type 'number' at tests/cases/compiler/classWithDuplicateIdentifier.ts 9:4, but here has type 'string'.
tests/cases/compiler/classWithDuplicateIdentifier.ts(11,5): error TS2717: Subsequent property declarations must have the same type. Property 'c' has type 'number' at tests/cases/compiler/classWithDuplicateIdentifier.ts 9:4, but here has type 'string'.
==== tests/cases/compiler/classWithDuplicateIdentifier.ts (5 errors) ====
@@ -26,6 +26,6 @@ tests/cases/compiler/classWithDuplicateIdentifier.ts(11,5): error TS2403: Subseq
~
!!! error TS2300: Duplicate identifier 'c'.
~
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'c' has type 'number' at tests/cases/compiler/classWithDuplicateIdentifier.ts 9:4, but here has type 'string'.
!!! error TS2717: Subsequent property declarations must have the same type. Property 'c' has type 'number' at tests/cases/compiler/classWithDuplicateIdentifier.ts 9:4, but here has type 'string'.
}
@@ -1,5 +1,5 @@
tests/cases/compiler/complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters.
tests/cases/compiler/complicatedPrivacy.ts(35,5): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
tests/cases/compiler/complicatedPrivacy.ts(35,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here.
tests/cases/compiler/complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'.
@@ -43,7 +43,7 @@ tests/cases/compiler/complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo
{
[number]: C1; // Used to be indexer, now it is a computed property
~~~~~~~~
!!! error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.
~~~~~~
!!! error TS2693: 'number' only refers to a type, but is being used as a value here.
}) {
@@ -1,12 +1,12 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(14,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(5,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(6,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(7,12): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(8,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(9,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(12,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(13,12): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(14,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(15,12): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts (9 errors) ====
@@ -16,31 +16,31 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES5.ts(15
class C {
[s]: number;
~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
[n] = n;
~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
static [s + s]: string;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
[s + n] = 2;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
[+s]: typeof s;
~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
static [""]: number;
[0]: number;
[a]: number;
~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
static [<any>true]: number;
~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
[`hello bye`] = 0;
~~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
static [`hello ${a} bye`] = 0
~~~~~~~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
}
@@ -31,10 +31,10 @@ class C {
>s : Symbol(s, Decl(computedPropertyNames12_ES5.ts, 0, 3))
static [""]: number;
>"" : Symbol(C[[""]], Decl(computedPropertyNames12_ES5.ts, 8, 19))
>"" : Symbol(C[""], Decl(computedPropertyNames12_ES5.ts, 8, 19))
[0]: number;
>0 : Symbol(C[[0]], Decl(computedPropertyNames12_ES5.ts, 9, 24))
>0 : Symbol(C[0], Decl(computedPropertyNames12_ES5.ts, 9, 24))
[a]: number;
>a : Symbol(a, Decl(computedPropertyNames12_ES5.ts, 2, 3))
@@ -1,12 +1,12 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(14,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(5,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(6,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(7,12): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(8,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(9,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(12,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(13,12): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(14,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(15,12): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts (9 errors) ====
@@ -16,31 +16,31 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames12_ES6.ts(15
class C {
[s]: number;
~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
[n] = n;
~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
static [s + s]: string;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
[s + n] = 2;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
[+s]: typeof s;
~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
static [""]: number;
[0]: number;
[a]: number;
~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
static [<any>true]: number;
~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
[`hello bye`] = 0;
~~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
static [`hello ${a} bye`] = 0
~~~~~~~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
}
@@ -31,10 +31,10 @@ class C {
>s : Symbol(s, Decl(computedPropertyNames12_ES6.ts, 0, 3))
static [""]: number;
>"" : Symbol(C[[""]], Decl(computedPropertyNames12_ES6.ts, 8, 19))
>"" : Symbol(C[""], Decl(computedPropertyNames12_ES6.ts, 8, 19))
[0]: number;
>0 : Symbol(C[[0]], Decl(computedPropertyNames12_ES6.ts, 9, 24))
>0 : Symbol(C[0], Decl(computedPropertyNames12_ES6.ts, 9, 24))
[a]: number;
>a : Symbol(a, Decl(computedPropertyNames12_ES6.ts, 2, 3))
@@ -29,10 +29,10 @@ class C {
>s : Symbol(s, Decl(computedPropertyNames13_ES5.ts, 0, 3))
static [""]() { }
>"" : Symbol(C[[""]], Decl(computedPropertyNames13_ES5.ts, 8, 14))
>"" : Symbol(C[""], Decl(computedPropertyNames13_ES5.ts, 8, 14))
[0]() { }
>0 : Symbol(C[[0]], Decl(computedPropertyNames13_ES5.ts, 9, 21))
>0 : Symbol(C[0], Decl(computedPropertyNames13_ES5.ts, 9, 21))
[a]() { }
>a : Symbol(a, Decl(computedPropertyNames13_ES5.ts, 2, 3))
@@ -29,10 +29,10 @@ class C {
>s : Symbol(s, Decl(computedPropertyNames13_ES6.ts, 0, 3))
static [""]() { }
>"" : Symbol(C[[""]], Decl(computedPropertyNames13_ES6.ts, 8, 14))
>"" : Symbol(C[""], Decl(computedPropertyNames13_ES6.ts, 8, 14))
[0]() { }
>0 : Symbol(C[[0]], Decl(computedPropertyNames13_ES6.ts, 9, 21))
>0 : Symbol(C[0], Decl(computedPropertyNames13_ES6.ts, 9, 21))
[a]() { }
>a : Symbol(a, Decl(computedPropertyNames13_ES6.ts, 2, 3))
@@ -31,11 +31,11 @@ class C {
>s : Symbol(s, Decl(computedPropertyNames16_ES5.ts, 0, 3))
static set [""](v) { }
>"" : Symbol(C[[""]], Decl(computedPropertyNames16_ES5.ts, 8, 28))
>"" : Symbol(C[""], Decl(computedPropertyNames16_ES5.ts, 8, 28))
>v : Symbol(v, Decl(computedPropertyNames16_ES5.ts, 9, 20))
get [0]() { return 0; }
>0 : Symbol(C[[0]], Decl(computedPropertyNames16_ES5.ts, 9, 26))
>0 : Symbol(C[0], Decl(computedPropertyNames16_ES5.ts, 9, 26))
set [a](v) { }
>a : Symbol(a, Decl(computedPropertyNames16_ES5.ts, 2, 3))
@@ -31,11 +31,11 @@ class C {
>s : Symbol(s, Decl(computedPropertyNames16_ES6.ts, 0, 3))
static set [""](v) { }
>"" : Symbol(C[[""]], Decl(computedPropertyNames16_ES6.ts, 8, 28))
>"" : Symbol(C[""], Decl(computedPropertyNames16_ES6.ts, 8, 28))
>v : Symbol(v, Decl(computedPropertyNames16_ES6.ts, 9, 20))
get [0]() { return 0; }
>0 : Symbol(C[[0]], Decl(computedPropertyNames16_ES6.ts, 9, 26))
>0 : Symbol(C[0], Decl(computedPropertyNames16_ES6.ts, 9, 26))
set [a](v) { }
>a : Symbol(a, Decl(computedPropertyNames16_ES6.ts, 2, 3))
@@ -1,4 +1,4 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames35_ES5.ts(4,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames35_ES5.ts(4,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames35_ES5.ts(4,10): error TS2467: A computed property name cannot reference a type parameter from its containing type.
@@ -8,7 +8,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames35_ES5.ts(4,
bar(): string;
[foo<T>()](): void;
~~~~~~~~~~
!!! error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
~
!!! error TS2467: A computed property name cannot reference a type parameter from its containing type.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames35_ES6.ts(4,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNames35_ES6.ts(4,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames35_ES6.ts(4,10): error TS2467: A computed property name cannot reference a type parameter from its containing type.
@@ -8,7 +8,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames35_ES6.ts(4,
bar(): string;
[foo<T>()](): void;
~~~~~~~~~~
!!! error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
~
!!! error TS2467: A computed property name cannot reference a type parameter from its containing type.
}
@@ -17,11 +17,11 @@ class C {
// Computed properties
get ["get1"]() { return new Foo }
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames36_ES5.ts, 4, 22))
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames36_ES5.ts, 4, 22))
>Foo : Symbol(Foo, Decl(computedPropertyNames36_ES5.ts, 0, 0))
set ["set1"](p: Foo2) { }
>"set1" : Symbol(C[["set1"]], Decl(computedPropertyNames36_ES5.ts, 7, 37))
>"set1" : Symbol(C["set1"], Decl(computedPropertyNames36_ES5.ts, 7, 37))
>p : Symbol(p, Decl(computedPropertyNames36_ES5.ts, 8, 17))
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames36_ES5.ts, 0, 15))
}
@@ -17,11 +17,11 @@ class C {
// Computed properties
get ["get1"]() { return new Foo }
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames36_ES6.ts, 4, 22))
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames36_ES6.ts, 4, 22))
>Foo : Symbol(Foo, Decl(computedPropertyNames36_ES6.ts, 0, 0))
set ["set1"](p: Foo2) { }
>"set1" : Symbol(C[["set1"]], Decl(computedPropertyNames36_ES6.ts, 7, 37))
>"set1" : Symbol(C["set1"], Decl(computedPropertyNames36_ES6.ts, 7, 37))
>p : Symbol(p, Decl(computedPropertyNames36_ES6.ts, 8, 17))
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames36_ES6.ts, 0, 15))
}
@@ -17,11 +17,11 @@ class C {
// Computed properties
get ["get1"]() { return new Foo }
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames37_ES5.ts, 4, 22))
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames37_ES5.ts, 4, 22))
>Foo : Symbol(Foo, Decl(computedPropertyNames37_ES5.ts, 0, 0))
set ["set1"](p: Foo2) { }
>"set1" : Symbol(C[["set1"]], Decl(computedPropertyNames37_ES5.ts, 7, 37))
>"set1" : Symbol(C["set1"], Decl(computedPropertyNames37_ES5.ts, 7, 37))
>p : Symbol(p, Decl(computedPropertyNames37_ES5.ts, 8, 17))
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames37_ES5.ts, 0, 15))
}
@@ -17,11 +17,11 @@ class C {
// Computed properties
get ["get1"]() { return new Foo }
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames37_ES6.ts, 4, 22))
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames37_ES6.ts, 4, 22))
>Foo : Symbol(Foo, Decl(computedPropertyNames37_ES6.ts, 0, 0))
set ["set1"](p: Foo2) { }
>"set1" : Symbol(C[["set1"]], Decl(computedPropertyNames37_ES6.ts, 7, 37))
>"set1" : Symbol(C["set1"], Decl(computedPropertyNames37_ES6.ts, 7, 37))
>p : Symbol(p, Decl(computedPropertyNames37_ES6.ts, 8, 17))
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames37_ES6.ts, 0, 15))
}
@@ -17,10 +17,10 @@ class C {
// Computed properties
[""]() { return new Foo }
>"" : Symbol(C[[""]], Decl(computedPropertyNames40_ES5.ts, 4, 28), Decl(computedPropertyNames40_ES5.ts, 7, 29))
>"" : Symbol(C[""], Decl(computedPropertyNames40_ES5.ts, 4, 28), Decl(computedPropertyNames40_ES5.ts, 7, 29))
>Foo : Symbol(Foo, Decl(computedPropertyNames40_ES5.ts, 0, 0))
[""]() { return new Foo2 }
>"" : Symbol(C[[""]], Decl(computedPropertyNames40_ES5.ts, 4, 28), Decl(computedPropertyNames40_ES5.ts, 7, 29))
>"" : Symbol(C[""], Decl(computedPropertyNames40_ES5.ts, 4, 28), Decl(computedPropertyNames40_ES5.ts, 7, 29))
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames40_ES5.ts, 0, 15))
}
@@ -17,10 +17,10 @@ class C {
// Computed properties
[""]() { return new Foo }
>"" : Symbol(C[[""]], Decl(computedPropertyNames40_ES6.ts, 4, 28), Decl(computedPropertyNames40_ES6.ts, 7, 29))
>"" : Symbol(C[""], Decl(computedPropertyNames40_ES6.ts, 4, 28), Decl(computedPropertyNames40_ES6.ts, 7, 29))
>Foo : Symbol(Foo, Decl(computedPropertyNames40_ES6.ts, 0, 0))
[""]() { return new Foo2 }
>"" : Symbol(C[[""]], Decl(computedPropertyNames40_ES6.ts, 4, 28), Decl(computedPropertyNames40_ES6.ts, 7, 29))
>"" : Symbol(C[""], Decl(computedPropertyNames40_ES6.ts, 4, 28), Decl(computedPropertyNames40_ES6.ts, 7, 29))
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames40_ES6.ts, 0, 15))
}
@@ -17,6 +17,6 @@ class C {
// Computed properties
static [""]() { return new Foo }
>"" : Symbol(C[[""]], Decl(computedPropertyNames41_ES5.ts, 4, 28))
>"" : Symbol(C[""], Decl(computedPropertyNames41_ES5.ts, 4, 28))
>Foo : Symbol(Foo, Decl(computedPropertyNames41_ES5.ts, 0, 0))
}
@@ -17,6 +17,6 @@ class C {
// Computed properties
static [""]() { return new Foo }
>"" : Symbol(C[[""]], Decl(computedPropertyNames41_ES6.ts, 4, 28))
>"" : Symbol(C[""], Decl(computedPropertyNames41_ES6.ts, 4, 28))
>Foo : Symbol(Foo, Decl(computedPropertyNames41_ES6.ts, 0, 0))
}
@@ -17,6 +17,6 @@ class C {
// Computed properties
[""]: Foo;
>"" : Symbol(C[[""]], Decl(computedPropertyNames42_ES5.ts, 4, 22))
>"" : Symbol(C[""], Decl(computedPropertyNames42_ES5.ts, 4, 22))
>Foo : Symbol(Foo, Decl(computedPropertyNames42_ES5.ts, 0, 0))
}
@@ -17,6 +17,6 @@ class C {
// Computed properties
[""]: Foo;
>"" : Symbol(C[[""]], Decl(computedPropertyNames42_ES6.ts, 4, 22))
>"" : Symbol(C[""], Decl(computedPropertyNames42_ES6.ts, 4, 22))
>Foo : Symbol(Foo, Decl(computedPropertyNames42_ES6.ts, 0, 0))
}
@@ -22,11 +22,11 @@ class D extends C {
// Computed properties
get ["get1"]() { return new Foo }
>"get1" : Symbol(D[["get1"]], Decl(computedPropertyNames43_ES5.ts, 7, 19))
>"get1" : Symbol(D["get1"], Decl(computedPropertyNames43_ES5.ts, 7, 19))
>Foo : Symbol(Foo, Decl(computedPropertyNames43_ES5.ts, 0, 0))
set ["set1"](p: Foo2) { }
>"set1" : Symbol(D[["set1"]], Decl(computedPropertyNames43_ES5.ts, 9, 37))
>"set1" : Symbol(D["set1"], Decl(computedPropertyNames43_ES5.ts, 9, 37))
>p : Symbol(p, Decl(computedPropertyNames43_ES5.ts, 10, 17))
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames43_ES5.ts, 0, 15))
}
@@ -22,11 +22,11 @@ class D extends C {
// Computed properties
get ["get1"]() { return new Foo }
>"get1" : Symbol(D[["get1"]], Decl(computedPropertyNames43_ES6.ts, 7, 19))
>"get1" : Symbol(D["get1"], Decl(computedPropertyNames43_ES6.ts, 7, 19))
>Foo : Symbol(Foo, Decl(computedPropertyNames43_ES6.ts, 0, 0))
set ["set1"](p: Foo2) { }
>"set1" : Symbol(D[["set1"]], Decl(computedPropertyNames43_ES6.ts, 9, 37))
>"set1" : Symbol(D["set1"], Decl(computedPropertyNames43_ES6.ts, 9, 37))
>p : Symbol(p, Decl(computedPropertyNames43_ES6.ts, 10, 17))
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames43_ES6.ts, 0, 15))
}
@@ -16,7 +16,7 @@ class C {
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames44_ES5.ts, 0, 15))
get ["get1"]() { return new Foo }
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames44_ES5.ts, 4, 22))
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames44_ES5.ts, 4, 22))
>Foo : Symbol(Foo, Decl(computedPropertyNames44_ES5.ts, 0, 0))
}
@@ -25,7 +25,7 @@ class D extends C {
>C : Symbol(C, Decl(computedPropertyNames44_ES5.ts, 1, 19))
set ["set1"](p: Foo) { }
>"set1" : Symbol(D[["set1"]], Decl(computedPropertyNames44_ES5.ts, 8, 19))
>"set1" : Symbol(D["set1"], Decl(computedPropertyNames44_ES5.ts, 8, 19))
>p : Symbol(p, Decl(computedPropertyNames44_ES5.ts, 9, 17))
>Foo : Symbol(Foo, Decl(computedPropertyNames44_ES5.ts, 0, 0))
}
@@ -16,7 +16,7 @@ class C {
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames44_ES6.ts, 0, 15))
get ["get1"]() { return new Foo }
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames44_ES6.ts, 4, 22))
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames44_ES6.ts, 4, 22))
>Foo : Symbol(Foo, Decl(computedPropertyNames44_ES6.ts, 0, 0))
}
@@ -25,7 +25,7 @@ class D extends C {
>C : Symbol(C, Decl(computedPropertyNames44_ES6.ts, 1, 19))
set ["set1"](p: Foo) { }
>"set1" : Symbol(D[["set1"]], Decl(computedPropertyNames44_ES6.ts, 8, 19))
>"set1" : Symbol(D["set1"], Decl(computedPropertyNames44_ES6.ts, 8, 19))
>p : Symbol(p, Decl(computedPropertyNames44_ES6.ts, 9, 17))
>Foo : Symbol(Foo, Decl(computedPropertyNames44_ES6.ts, 0, 0))
}
@@ -12,7 +12,7 @@ class C {
>C : Symbol(C, Decl(computedPropertyNames45_ES5.ts, 1, 19))
get ["get1"]() { return new Foo }
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames45_ES5.ts, 3, 9))
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames45_ES5.ts, 3, 9))
>Foo : Symbol(Foo, Decl(computedPropertyNames45_ES5.ts, 0, 0))
}
@@ -26,7 +26,7 @@ class D extends C {
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames45_ES5.ts, 0, 15))
set ["set1"](p: Foo) { }
>"set1" : Symbol(D[["set1"]], Decl(computedPropertyNames45_ES5.ts, 9, 22))
>"set1" : Symbol(D["set1"], Decl(computedPropertyNames45_ES5.ts, 9, 22))
>p : Symbol(p, Decl(computedPropertyNames45_ES5.ts, 10, 17))
>Foo : Symbol(Foo, Decl(computedPropertyNames45_ES5.ts, 0, 0))
}
@@ -12,7 +12,7 @@ class C {
>C : Symbol(C, Decl(computedPropertyNames45_ES6.ts, 1, 19))
get ["get1"]() { return new Foo }
>"get1" : Symbol(C[["get1"]], Decl(computedPropertyNames45_ES6.ts, 3, 9))
>"get1" : Symbol(C["get1"], Decl(computedPropertyNames45_ES6.ts, 3, 9))
>Foo : Symbol(Foo, Decl(computedPropertyNames45_ES6.ts, 0, 0))
}
@@ -26,7 +26,7 @@ class D extends C {
>Foo2 : Symbol(Foo2, Decl(computedPropertyNames45_ES6.ts, 0, 15))
set ["set1"](p: Foo) { }
>"set1" : Symbol(D[["set1"]], Decl(computedPropertyNames45_ES6.ts, 9, 22))
>"set1" : Symbol(D["set1"], Decl(computedPropertyNames45_ES6.ts, 9, 22))
>p : Symbol(p, Decl(computedPropertyNames45_ES6.ts, 10, 17))
>Foo : Symbol(Foo, Decl(computedPropertyNames45_ES6.ts, 0, 0))
}
@@ -1,9 +1,9 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit3_ES5.ts(2,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit3_ES5.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit3_ES5.ts (1 errors) ====
interface I {
["" + ""](): void;
~~~~~~~~~
!!! error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
}
@@ -1,9 +1,9 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit3_ES6.ts(2,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit3_ES6.ts(2,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit3_ES6.ts (1 errors) ====
interface I {
["" + ""](): void;
~~~~~~~~~
!!! error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
}
@@ -1,9 +1,9 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit4_ES5.ts(2,5): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit4_ES5.ts(2,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit4_ES5.ts (1 errors) ====
var v: {
["" + ""](): void;
~~~~~~~~~
!!! error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.
}
@@ -1,9 +1,9 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit4_ES6.ts(2,5): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit4_ES6.ts(2,5): error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit4_ES6.ts (1 errors) ====
var v: {
["" + ""](): void;
~~~~~~~~~
!!! error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
!!! error TS1170: A computed property name in a type literal must refer to an expression whose type is a literal type or a 'unique symbol' type.
}
@@ -1,5 +1,5 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES5.ts (2 errors) ====
@@ -8,9 +8,9 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_
class C {
[methodName](v: string);
~~~~~~~~~~~~
!!! error TS1168: A computed property name in a method overload must directly refer to a built-in symbol.
!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.
[methodName]();
~~~~~~~~~~~~
!!! error TS1168: A computed property name in a method overload must directly refer to a built-in symbol.
!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.
[methodName](v?: string) { }
}
@@ -1,5 +1,5 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must directly refer to a built-in symbol.
tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts(4,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts(5,5): error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_ES6.ts (2 errors) ====
@@ -8,9 +8,9 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads_
class C {
[methodName](v: string);
~~~~~~~~~~~~
!!! error TS1168: A computed property name in a method overload must directly refer to a built-in symbol.
!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.
[methodName]();
~~~~~~~~~~~~
!!! error TS1168: A computed property name in a method overload must directly refer to a built-in symbol.
!!! error TS1168: A computed property name in a method overload must refer to an expression whose type is a literal type or a 'unique symbol' type.
[methodName](v?: string) { }
}
@@ -3,12 +3,12 @@ class C {
>C : Symbol(C, Decl(computedPropertyNamesSourceMap1_ES5.ts, 0, 0))
["hello"]() {
>"hello" : Symbol(C[["hello"]], Decl(computedPropertyNamesSourceMap1_ES5.ts, 0, 9))
>"hello" : Symbol(C["hello"], Decl(computedPropertyNamesSourceMap1_ES5.ts, 0, 9))
debugger;
}
get ["goodbye"]() {
>"goodbye" : Symbol(C[["goodbye"]], Decl(computedPropertyNamesSourceMap1_ES5.ts, 3, 5))
>"goodbye" : Symbol(C["goodbye"], Decl(computedPropertyNamesSourceMap1_ES5.ts, 3, 5))
return 0;
}
@@ -3,12 +3,12 @@ class C {
>C : Symbol(C, Decl(computedPropertyNamesSourceMap1_ES6.ts, 0, 0))
["hello"]() {
>"hello" : Symbol(C[["hello"]], Decl(computedPropertyNamesSourceMap1_ES6.ts, 0, 9))
>"hello" : Symbol(C["hello"], Decl(computedPropertyNamesSourceMap1_ES6.ts, 0, 9))
debugger;
}
get ["goodbye"]() {
>"goodbye" : Symbol(C[["goodbye"]], Decl(computedPropertyNamesSourceMap1_ES6.ts, 3, 2))
>"goodbye" : Symbol(C["goodbye"], Decl(computedPropertyNamesSourceMap1_ES6.ts, 3, 2))
return 0;
}
@@ -15,9 +15,9 @@ class C {
@dec ["1"]() { }
>dec : Symbol(dec, Decl(decoratorOnClassMethod13.ts, 0, 0))
>"1" : Symbol(C[["1"]], Decl(decoratorOnClassMethod13.ts, 2, 9))
>"1" : Symbol(C["1"], Decl(decoratorOnClassMethod13.ts, 2, 9))
@dec ["b"]() { }
>dec : Symbol(dec, Decl(decoratorOnClassMethod13.ts, 0, 0))
>"b" : Symbol(C[["b"]], Decl(decoratorOnClassMethod13.ts, 3, 20))
>"b" : Symbol(C["b"], Decl(decoratorOnClassMethod13.ts, 3, 20))
}
@@ -15,5 +15,5 @@ class C {
@dec ["method"]() {}
>dec : Symbol(dec, Decl(decoratorOnClassMethod4.ts, 0, 0))
>"method" : Symbol(C[["method"]], Decl(decoratorOnClassMethod4.ts, 2, 9))
>"method" : Symbol(C["method"], Decl(decoratorOnClassMethod4.ts, 2, 9))
}
@@ -15,5 +15,5 @@ class C {
@dec() ["method"]() {}
>dec : Symbol(dec, Decl(decoratorOnClassMethod5.ts, 0, 0))
>"method" : Symbol(C[["method"]], Decl(decoratorOnClassMethod5.ts, 2, 9))
>"method" : Symbol(C["method"], Decl(decoratorOnClassMethod5.ts, 2, 9))
}
@@ -15,5 +15,5 @@ class C {
@dec ["method"]() {}
>dec : Symbol(dec, Decl(decoratorOnClassMethod6.ts, 0, 0))
>"method" : Symbol(C[["method"]], Decl(decoratorOnClassMethod6.ts, 2, 9))
>"method" : Symbol(C["method"], Decl(decoratorOnClassMethod6.ts, 2, 9))
}
@@ -15,5 +15,5 @@ class C {
@dec public ["method"]() {}
>dec : Symbol(dec, Decl(decoratorOnClassMethod7.ts, 0, 0))
>"method" : Symbol(C[["method"]], Decl(decoratorOnClassMethod7.ts, 2, 9))
>"method" : Symbol(C["method"], Decl(decoratorOnClassMethod7.ts, 2, 9))
}
@@ -1,82 +1,82 @@
tests/cases/compiler/decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(18,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(19,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(20,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(21,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(22,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(23,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(27,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(28,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(29,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(30,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(35,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(35,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(36,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(37,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(38,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(38,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(39,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(40,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(52,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(53,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(54,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(55,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(56,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(57,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(62,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(63,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(64,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(65,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(70,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(70,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(71,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(72,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(73,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(73,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(74,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(75,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(88,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(89,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(90,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(92,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(93,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(94,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(98,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(99,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(100,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(101,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(106,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(106,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(107,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(108,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(110,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(110,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(111,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(112,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(124,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(125,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(126,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(128,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(129,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(131,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(135,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(136,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(137,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(138,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(143,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(143,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(144,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(145,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(147,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(147,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(148,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(150,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(162,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(163,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(164,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(166,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(167,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(169,8): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(173,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(174,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(175,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(176,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(181,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(181,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(182,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(183,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(184,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(185,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/decoratorsOnComputedProperties.ts(185,5): error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/decoratorsOnComputedProperties.ts(186,5): error TS1206: Decorators are not valid here.
tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Decorators are not valid here.
@@ -101,22 +101,22 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
[Symbol.match]: any = null;
[foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any = null;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
[fieldNameA]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [fieldNameB]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [fieldNameC]: any = null;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
}
void class B {
@@ -138,7 +138,7 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
[Symbol.match]: any = null;
[foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any;
~
!!! error TS1206: Decorators are not valid here.
@@ -147,7 +147,7 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
!!! error TS1206: Decorators are not valid here.
[fieldNameA]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [fieldNameB]: any;
~
!!! error TS1206: Decorators are not valid here.
@@ -167,22 +167,22 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
[Symbol.match]: any = null;
[foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any = null;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
[fieldNameA]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [fieldNameB]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [fieldNameC]: any = null;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
["some" + "method"]() {}
}
@@ -205,7 +205,7 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
[Symbol.match]: any = null;
[foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any;
~
!!! error TS1206: Decorators are not valid here.
@@ -214,7 +214,7 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
!!! error TS1206: Decorators are not valid here.
[fieldNameA]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [fieldNameB]: any;
~
!!! error TS1206: Decorators are not valid here.
@@ -235,23 +235,23 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
[Symbol.match]: any = null;
[foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any = null;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
["some" + "method"]() {}
[fieldNameA]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [fieldNameB]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [fieldNameC]: any = null;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
}
void class F {
@@ -273,7 +273,7 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
[Symbol.match]: any = null;
[foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any;
~
!!! error TS1206: Decorators are not valid here.
@@ -283,7 +283,7 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
["some" + "method"]() {}
[fieldNameA]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [fieldNameB]: any;
~
!!! error TS1206: Decorators are not valid here.
@@ -303,24 +303,24 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
[Symbol.match]: any = null;
[foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any = null;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
["some" + "method"]() {}
[fieldNameA]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [fieldNameB]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
["some" + "method2"]() {}
@x [fieldNameC]: any = null;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
}
void class H {
@@ -342,7 +342,7 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
[Symbol.match]: any = null;
[foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any;
~
!!! error TS1206: Decorators are not valid here.
@@ -352,7 +352,7 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
["some" + "method"]() {}
[fieldNameA]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [fieldNameB]: any;
~
!!! error TS1206: Decorators are not valid here.
@@ -373,24 +373,24 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
[Symbol.match]: any = null;
[foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any = null;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x ["some" + "method"]() {}
[fieldNameA]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [fieldNameB]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
["some" + "method2"]() {}
@x [fieldNameC]: any = null;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
}
void class J {
@@ -412,7 +412,7 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
[Symbol.match]: any = null;
[foo()]: any;
~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [foo()]: any;
~
!!! error TS1206: Decorators are not valid here.
@@ -424,7 +424,7 @@ tests/cases/compiler/decoratorsOnComputedProperties.ts(188,5): error TS1206: Dec
!!! error TS1206: Decorators are not valid here.
[fieldNameA]: any;
~~~~~~~~~~~~
!!! error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
!!! error TS1166: A computed property name in a class property declaration must refer to an expression whose type is a literal type or a 'unique symbol' type.
@x [fieldNameB]: any;
~
!!! error TS1206: Decorators are not valid here.
@@ -26,7 +26,7 @@ class A {
@x ["property"]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property" : Symbol(A[["property"]], Decl(decoratorsOnComputedProperties.ts, 8, 9))
>"property" : Symbol(A["property"], Decl(decoratorsOnComputedProperties.ts, 8, 9))
@x [Symbol.toStringTag]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -36,7 +36,7 @@ class A {
@x ["property2"]: any = 2;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property2" : Symbol(A[["property2"]], Decl(decoratorsOnComputedProperties.ts, 10, 33))
>"property2" : Symbol(A["property2"], Decl(decoratorsOnComputedProperties.ts, 10, 33))
@x [Symbol.iterator]: any = null;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -45,7 +45,7 @@ class A {
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
["property3"]: any;
>"property3" : Symbol(A[["property3"]], Decl(decoratorsOnComputedProperties.ts, 12, 37))
>"property3" : Symbol(A["property3"], Decl(decoratorsOnComputedProperties.ts, 12, 37))
[Symbol.isConcatSpreadable]: any;
>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -53,7 +53,7 @@ class A {
>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
["property4"]: any = 2;
>"property4" : Symbol(A[["property4"]], Decl(decoratorsOnComputedProperties.ts, 14, 37))
>"property4" : Symbol(A["property4"], Decl(decoratorsOnComputedProperties.ts, 14, 37))
[Symbol.match]: any = null;
>Symbol.match : Symbol(SymbolConstructor.match, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -88,7 +88,7 @@ void class B {
@x ["property"]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property" : Symbol(B[["property"]], Decl(decoratorsOnComputedProperties.ts, 25, 14))
>"property" : Symbol(B["property"], Decl(decoratorsOnComputedProperties.ts, 25, 14))
@x [Symbol.toStringTag]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -98,7 +98,7 @@ void class B {
@x ["property2"]: any = 2;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property2" : Symbol(B[["property2"]], Decl(decoratorsOnComputedProperties.ts, 27, 33))
>"property2" : Symbol(B["property2"], Decl(decoratorsOnComputedProperties.ts, 27, 33))
@x [Symbol.iterator]: any = null;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -107,7 +107,7 @@ void class B {
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
["property3"]: any;
>"property3" : Symbol(B[["property3"]], Decl(decoratorsOnComputedProperties.ts, 29, 37))
>"property3" : Symbol(B["property3"], Decl(decoratorsOnComputedProperties.ts, 29, 37))
[Symbol.isConcatSpreadable]: any;
>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -115,7 +115,7 @@ void class B {
>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
["property4"]: any = 2;
>"property4" : Symbol(B[["property4"]], Decl(decoratorsOnComputedProperties.ts, 31, 37))
>"property4" : Symbol(B["property4"], Decl(decoratorsOnComputedProperties.ts, 31, 37))
[Symbol.match]: any = null;
>Symbol.match : Symbol(SymbolConstructor.match, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -151,7 +151,7 @@ class C {
@x ["property"]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property" : Symbol(C[["property"]], Decl(decoratorsOnComputedProperties.ts, 42, 9))
>"property" : Symbol(C["property"], Decl(decoratorsOnComputedProperties.ts, 42, 9))
@x [Symbol.toStringTag]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -161,7 +161,7 @@ class C {
@x ["property2"]: any = 2;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property2" : Symbol(C[["property2"]], Decl(decoratorsOnComputedProperties.ts, 44, 33))
>"property2" : Symbol(C["property2"], Decl(decoratorsOnComputedProperties.ts, 44, 33))
@x [Symbol.iterator]: any = null;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -170,7 +170,7 @@ class C {
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
["property3"]: any;
>"property3" : Symbol(C[["property3"]], Decl(decoratorsOnComputedProperties.ts, 46, 37))
>"property3" : Symbol(C["property3"], Decl(decoratorsOnComputedProperties.ts, 46, 37))
[Symbol.isConcatSpreadable]: any;
>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -178,7 +178,7 @@ class C {
>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
["property4"]: any = 2;
>"property4" : Symbol(C[["property4"]], Decl(decoratorsOnComputedProperties.ts, 48, 37))
>"property4" : Symbol(C["property4"], Decl(decoratorsOnComputedProperties.ts, 48, 37))
[Symbol.match]: any = null;
>Symbol.match : Symbol(SymbolConstructor.match, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -215,7 +215,7 @@ void class D {
@x ["property"]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property" : Symbol(D[["property"]], Decl(decoratorsOnComputedProperties.ts, 60, 14))
>"property" : Symbol(D["property"], Decl(decoratorsOnComputedProperties.ts, 60, 14))
@x [Symbol.toStringTag]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -225,7 +225,7 @@ void class D {
@x ["property2"]: any = 2;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property2" : Symbol(D[["property2"]], Decl(decoratorsOnComputedProperties.ts, 62, 33))
>"property2" : Symbol(D["property2"], Decl(decoratorsOnComputedProperties.ts, 62, 33))
@x [Symbol.iterator]: any = null;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -234,7 +234,7 @@ void class D {
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
["property3"]: any;
>"property3" : Symbol(D[["property3"]], Decl(decoratorsOnComputedProperties.ts, 64, 37))
>"property3" : Symbol(D["property3"], Decl(decoratorsOnComputedProperties.ts, 64, 37))
[Symbol.isConcatSpreadable]: any;
>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -242,7 +242,7 @@ void class D {
>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
["property4"]: any = 2;
>"property4" : Symbol(D[["property4"]], Decl(decoratorsOnComputedProperties.ts, 66, 37))
>"property4" : Symbol(D["property4"], Decl(decoratorsOnComputedProperties.ts, 66, 37))
[Symbol.match]: any = null;
>Symbol.match : Symbol(SymbolConstructor.match, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -279,7 +279,7 @@ class E {
@x ["property"]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property" : Symbol(E[["property"]], Decl(decoratorsOnComputedProperties.ts, 78, 9))
>"property" : Symbol(E["property"], Decl(decoratorsOnComputedProperties.ts, 78, 9))
@x [Symbol.toStringTag]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -289,7 +289,7 @@ class E {
@x ["property2"]: any = 2;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property2" : Symbol(E[["property2"]], Decl(decoratorsOnComputedProperties.ts, 80, 33))
>"property2" : Symbol(E["property2"], Decl(decoratorsOnComputedProperties.ts, 80, 33))
@x [Symbol.iterator]: any = null;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -298,7 +298,7 @@ class E {
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
["property3"]: any;
>"property3" : Symbol(E[["property3"]], Decl(decoratorsOnComputedProperties.ts, 82, 37))
>"property3" : Symbol(E["property3"], Decl(decoratorsOnComputedProperties.ts, 82, 37))
[Symbol.isConcatSpreadable]: any;
>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -306,7 +306,7 @@ class E {
>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
["property4"]: any = 2;
>"property4" : Symbol(E[["property4"]], Decl(decoratorsOnComputedProperties.ts, 84, 37))
>"property4" : Symbol(E["property4"], Decl(decoratorsOnComputedProperties.ts, 84, 37))
[Symbol.match]: any = null;
>Symbol.match : Symbol(SymbolConstructor.match, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -342,7 +342,7 @@ void class F {
@x ["property"]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property" : Symbol(F[["property"]], Decl(decoratorsOnComputedProperties.ts, 96, 14))
>"property" : Symbol(F["property"], Decl(decoratorsOnComputedProperties.ts, 96, 14))
@x [Symbol.toStringTag]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -352,7 +352,7 @@ void class F {
@x ["property2"]: any = 2;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property2" : Symbol(F[["property2"]], Decl(decoratorsOnComputedProperties.ts, 98, 33))
>"property2" : Symbol(F["property2"], Decl(decoratorsOnComputedProperties.ts, 98, 33))
@x [Symbol.iterator]: any = null;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -361,7 +361,7 @@ void class F {
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
["property3"]: any;
>"property3" : Symbol(F[["property3"]], Decl(decoratorsOnComputedProperties.ts, 100, 37))
>"property3" : Symbol(F["property3"], Decl(decoratorsOnComputedProperties.ts, 100, 37))
[Symbol.isConcatSpreadable]: any;
>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -369,7 +369,7 @@ void class F {
>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
["property4"]: any = 2;
>"property4" : Symbol(F[["property4"]], Decl(decoratorsOnComputedProperties.ts, 102, 37))
>"property4" : Symbol(F["property4"], Decl(decoratorsOnComputedProperties.ts, 102, 37))
[Symbol.match]: any = null;
>Symbol.match : Symbol(SymbolConstructor.match, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -406,7 +406,7 @@ class G {
@x ["property"]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property" : Symbol(G[["property"]], Decl(decoratorsOnComputedProperties.ts, 114, 9))
>"property" : Symbol(G["property"], Decl(decoratorsOnComputedProperties.ts, 114, 9))
@x [Symbol.toStringTag]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -416,7 +416,7 @@ class G {
@x ["property2"]: any = 2;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property2" : Symbol(G[["property2"]], Decl(decoratorsOnComputedProperties.ts, 116, 33))
>"property2" : Symbol(G["property2"], Decl(decoratorsOnComputedProperties.ts, 116, 33))
@x [Symbol.iterator]: any = null;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -425,7 +425,7 @@ class G {
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
["property3"]: any;
>"property3" : Symbol(G[["property3"]], Decl(decoratorsOnComputedProperties.ts, 118, 37))
>"property3" : Symbol(G["property3"], Decl(decoratorsOnComputedProperties.ts, 118, 37))
[Symbol.isConcatSpreadable]: any;
>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -433,7 +433,7 @@ class G {
>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
["property4"]: any = 2;
>"property4" : Symbol(G[["property4"]], Decl(decoratorsOnComputedProperties.ts, 120, 37))
>"property4" : Symbol(G["property4"], Decl(decoratorsOnComputedProperties.ts, 120, 37))
[Symbol.match]: any = null;
>Symbol.match : Symbol(SymbolConstructor.match, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -470,7 +470,7 @@ void class H {
@x ["property"]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property" : Symbol(H[["property"]], Decl(decoratorsOnComputedProperties.ts, 133, 14))
>"property" : Symbol(H["property"], Decl(decoratorsOnComputedProperties.ts, 133, 14))
@x [Symbol.toStringTag]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -480,7 +480,7 @@ void class H {
@x ["property2"]: any = 2;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property2" : Symbol(H[["property2"]], Decl(decoratorsOnComputedProperties.ts, 135, 33))
>"property2" : Symbol(H["property2"], Decl(decoratorsOnComputedProperties.ts, 135, 33))
@x [Symbol.iterator]: any = null;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -489,7 +489,7 @@ void class H {
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
["property3"]: any;
>"property3" : Symbol(H[["property3"]], Decl(decoratorsOnComputedProperties.ts, 137, 37))
>"property3" : Symbol(H["property3"], Decl(decoratorsOnComputedProperties.ts, 137, 37))
[Symbol.isConcatSpreadable]: any;
>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -497,7 +497,7 @@ void class H {
>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
["property4"]: any = 2;
>"property4" : Symbol(H[["property4"]], Decl(decoratorsOnComputedProperties.ts, 139, 37))
>"property4" : Symbol(H["property4"], Decl(decoratorsOnComputedProperties.ts, 139, 37))
[Symbol.match]: any = null;
>Symbol.match : Symbol(SymbolConstructor.match, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -535,7 +535,7 @@ class I {
@x ["property"]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property" : Symbol(I[["property"]], Decl(decoratorsOnComputedProperties.ts, 152, 9))
>"property" : Symbol(I["property"], Decl(decoratorsOnComputedProperties.ts, 152, 9))
@x [Symbol.toStringTag]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -545,7 +545,7 @@ class I {
@x ["property2"]: any = 2;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property2" : Symbol(I[["property2"]], Decl(decoratorsOnComputedProperties.ts, 154, 33))
>"property2" : Symbol(I["property2"], Decl(decoratorsOnComputedProperties.ts, 154, 33))
@x [Symbol.iterator]: any = null;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -554,7 +554,7 @@ class I {
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
["property3"]: any;
>"property3" : Symbol(I[["property3"]], Decl(decoratorsOnComputedProperties.ts, 156, 37))
>"property3" : Symbol(I["property3"], Decl(decoratorsOnComputedProperties.ts, 156, 37))
[Symbol.isConcatSpreadable]: any;
>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -562,7 +562,7 @@ class I {
>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
["property4"]: any = 2;
>"property4" : Symbol(I[["property4"]], Decl(decoratorsOnComputedProperties.ts, 158, 37))
>"property4" : Symbol(I["property4"], Decl(decoratorsOnComputedProperties.ts, 158, 37))
[Symbol.match]: any = null;
>Symbol.match : Symbol(SymbolConstructor.match, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -601,7 +601,7 @@ void class J {
@x ["property"]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property" : Symbol(J[["property"]], Decl(decoratorsOnComputedProperties.ts, 171, 14))
>"property" : Symbol(J["property"], Decl(decoratorsOnComputedProperties.ts, 171, 14))
@x [Symbol.toStringTag]: any;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -611,7 +611,7 @@ void class J {
@x ["property2"]: any = 2;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
>"property2" : Symbol(J[["property2"]], Decl(decoratorsOnComputedProperties.ts, 173, 33))
>"property2" : Symbol(J["property2"], Decl(decoratorsOnComputedProperties.ts, 173, 33))
@x [Symbol.iterator]: any = null;
>x : Symbol(x, Decl(decoratorsOnComputedProperties.ts, 0, 0))
@@ -620,7 +620,7 @@ void class J {
>iterator : Symbol(SymbolConstructor.iterator, Decl(lib.es2015.iterable.d.ts, --, --))
["property3"]: any;
>"property3" : Symbol(J[["property3"]], Decl(decoratorsOnComputedProperties.ts, 175, 37))
>"property3" : Symbol(J["property3"], Decl(decoratorsOnComputedProperties.ts, 175, 37))
[Symbol.isConcatSpreadable]: any;
>Symbol.isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -628,7 +628,7 @@ void class J {
>isConcatSpreadable : Symbol(SymbolConstructor.isConcatSpreadable, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
["property4"]: any = 2;
>"property4" : Symbol(J[["property4"]], Decl(decoratorsOnComputedProperties.ts, 177, 37))
>"property4" : Symbol(J["property4"], Decl(decoratorsOnComputedProperties.ts, 177, 37))
[Symbol.match]: any = null;
>Symbol.match : Symbol(SymbolConstructor.match, Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
@@ -16,7 +16,7 @@ tests/cases/compiler/duplicateClassElements.ts(26,9): error TS2300: Duplicate id
tests/cases/compiler/duplicateClassElements.ts(29,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/duplicateClassElements.ts(32,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/duplicateClassElements.ts(34,12): error TS2300: Duplicate identifier 'x2'.
tests/cases/compiler/duplicateClassElements.ts(34,12): error TS2403: Subsequent variable declarations must have the same type. Variable 'x2' has type 'number' at tests/cases/compiler/duplicateClassElements.ts 28:8, but here has type 'any'.
tests/cases/compiler/duplicateClassElements.ts(34,12): error TS2717: Subsequent property declarations must have the same type. Property 'x2' has type 'number' at tests/cases/compiler/duplicateClassElements.ts 28:8, but here has type 'any'.
tests/cases/compiler/duplicateClassElements.ts(36,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/duplicateClassElements.ts(36,9): error TS2300: Duplicate identifier 'z2'.
tests/cases/compiler/duplicateClassElements.ts(39,9): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
@@ -96,7 +96,7 @@ tests/cases/compiler/duplicateClassElements.ts(41,12): error TS2300: Duplicate i
~~
!!! error TS2300: Duplicate identifier 'x2'.
~~
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'x2' has type 'number' at tests/cases/compiler/duplicateClassElements.ts 28:8, but here has type 'any'.
!!! error TS2717: Subsequent property declarations must have the same type. Property 'x2' has type 'number' at tests/cases/compiler/duplicateClassElements.ts 28:8, but here has type 'any'.
get z2() {
~~
@@ -3,9 +3,9 @@ class C {
>C : Symbol(C, Decl(duplicateIdentifierComputedName.ts, 0, 0))
["a"]: string;
>"a" : Symbol(C[["a"]], Decl(duplicateIdentifierComputedName.ts, 0, 9), Decl(duplicateIdentifierComputedName.ts, 1, 18))
>"a" : Symbol(C["a"], Decl(duplicateIdentifierComputedName.ts, 0, 9), Decl(duplicateIdentifierComputedName.ts, 1, 18))
["a"]: string;
>"a" : Symbol(C[["a"]], Decl(duplicateIdentifierComputedName.ts, 0, 9), Decl(duplicateIdentifierComputedName.ts, 1, 18))
>"a" : Symbol(C["a"], Decl(duplicateIdentifierComputedName.ts, 0, 9), Decl(duplicateIdentifierComputedName.ts, 1, 18))
}
+244
View File
@@ -0,0 +1,244 @@
//// [tests/cases/compiler/dynamicNames.ts] ////
//// [module.ts]
export const c0 = "a";
export const c1 = 1;
export const s0 = Symbol();
export interface T0 {
[c0]: number;
[c1]: string;
[s0]: boolean;
}
export declare class T1 implements T2 {
[c0]: number;
[c1]: string;
[s0]: boolean;
}
export declare class T2 extends T1 {
}
export declare type T3 = {
[c0]: number;
[c1]: string;
[s0]: boolean;
};
//// [main.ts]
import { c0, c1, s0, T0, T1, T2, T3 } from "./module";
import * as M from "./module";
namespace N {
export const c2 = "a";
export const c3 = 1;
export const s1: typeof s0 = s0;
export interface T4 {
[N.c2]: number;
[N.c3]: string;
[N.s1]: boolean;
}
export declare class T5 implements T4 {
[N.c2]: number;
[N.c3]: string;
[N.s1]: boolean;
}
export declare class T6 extends T5 {
}
export declare type T7 = {
[N.c2]: number;
[N.c3]: string;
[N.s1]: boolean;
};
}
export const c4 = "a";
export const c5 = 1;
export const s2: typeof s0 = s0;
interface T8 {
[c4]: number;
[c5]: string;
[s2]: boolean;
}
declare class T9 implements T8 {
[c4]: number;
[c5]: string;
[s2]: boolean;
}
declare class T10 extends T9 {
}
declare type T11 = {
[c4]: number;
[c5]: string;
[s2]: boolean;
};
interface T12 {
a: number;
1: string;
[s2]: boolean;
}
declare class T13 implements T2 {
a: number;
1: string;
[s2]: boolean;
}
declare class T14 extends T13 {
}
declare type T15 = {
a: number;
1: string;
[s2]: boolean;
};
declare class C {
static a: number;
static 1: string;
static [s2]: boolean;
}
let t0: T0;
let t1: T1;
let t2: T2;
let t3: T3;
let t0_1: M.T0;
let t1_1: M.T1;
let t2_1: M.T2;
let t3_1: M.T3;
let t4: N.T4;
let t5: N.T5;
let t6: N.T6;
let t7: N.T7;
let t8: T8;
let t9: T9;
let t10: T10;
let t11: T11;
let t12: T12;
let t13: T13;
let t14: T14;
let t15: T15;
// assignability
t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3, t3 = t0, t3 = t1, t3 = t2;
t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5, t7 = t6;
t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0, t14 = t0, t15 = t0;
t0 = C; // static side
// object literals
export const o1 = {
[c4]: 1,
[c5]: "a",
[s2]: true
};
// check element access types
export const o1_c4 = o1[c4];
export const o1_c5 = o1[c5];
export const o1_s2 = o1[s2];
export const o2: T0 = o1;
// recursive declarations
declare const rI: RI;
interface RI {
x: "a";
[rI.x]: "b";
}
declare const rC: RC;
declare class RC {
x: "a";
[rC.x]: "b";
}
//// [module.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.c0 = "a";
exports.c1 = 1;
exports.s0 = Symbol();
//// [main.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const module_1 = require("./module");
var N;
(function (N) {
N.c2 = "a";
N.c3 = 1;
N.s1 = module_1.s0;
})(N || (N = {}));
exports.c4 = "a";
exports.c5 = 1;
exports.s2 = module_1.s0;
let t0;
let t1;
let t2;
let t3;
let t0_1;
let t1_1;
let t2_1;
let t3_1;
let t4;
let t5;
let t6;
let t7;
let t8;
let t9;
let t10;
let t11;
let t12;
let t13;
let t14;
let t15;
// assignability
t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3, t3 = t0, t3 = t1, t3 = t2;
t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5, t7 = t6;
t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0, t14 = t0, t15 = t0;
t0 = C; // static side
// object literals
exports.o1 = {
[exports.c4]: 1,
[exports.c5]: "a",
[exports.s2]: true
};
// check element access types
exports.o1_c4 = exports.o1[exports.c4];
exports.o1_c5 = exports.o1[exports.c5];
exports.o1_s2 = exports.o1[exports.s2];
exports.o2 = exports.o1;
//// [module.d.ts]
export declare const c0 = "a";
export declare const c1 = 1;
export declare const s0: unique symbol;
export interface T0 {
[c0]: number;
[c1]: string;
[s0]: boolean;
}
export declare class T1 implements T2 {
[c0]: number;
[c1]: string;
[s0]: boolean;
}
export declare class T2 extends T1 {
}
export declare type T3 = {
[c0]: number;
[c1]: string;
[s0]: boolean;
};
//// [main.d.ts]
import { s0, T0 } from "./module";
export declare const c4 = "a";
export declare const c5 = 1;
export declare const s2: typeof s0;
export declare const o1: {
[c4]: number;
[c5]: string;
[s2]: boolean;
};
export declare const o1_c4: number;
export declare const o1_c5: string;
export declare const o1_s2: boolean;
export declare const o2: T0;
@@ -0,0 +1,476 @@
=== tests/cases/compiler/module.ts ===
export const c0 = "a";
>c0 : Symbol(c0, Decl(module.ts, 0, 12))
export const c1 = 1;
>c1 : Symbol(c1, Decl(module.ts, 1, 12))
export const s0 = Symbol();
>s0 : Symbol(s0, Decl(module.ts, 2, 12))
>Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --))
export interface T0 {
>T0 : Symbol(T0, Decl(module.ts, 2, 27))
[c0]: number;
>c0 : Symbol(c0, Decl(module.ts, 0, 12))
[c1]: string;
>c1 : Symbol(c1, Decl(module.ts, 1, 12))
[s0]: boolean;
>s0 : Symbol(s0, Decl(module.ts, 2, 12))
}
export declare class T1 implements T2 {
>T1 : Symbol(T1, Decl(module.ts, 7, 1))
>T2 : Symbol(T2, Decl(module.ts, 12, 1))
[c0]: number;
>c0 : Symbol(c0, Decl(module.ts, 0, 12))
[c1]: string;
>c1 : Symbol(c1, Decl(module.ts, 1, 12))
[s0]: boolean;
>s0 : Symbol(s0, Decl(module.ts, 2, 12))
}
export declare class T2 extends T1 {
>T2 : Symbol(T2, Decl(module.ts, 12, 1))
>T1 : Symbol(T1, Decl(module.ts, 7, 1))
}
export declare type T3 = {
>T3 : Symbol(T3, Decl(module.ts, 14, 1))
[c0]: number;
>c0 : Symbol(c0, Decl(module.ts, 0, 12))
[c1]: string;
>c1 : Symbol(c1, Decl(module.ts, 1, 12))
[s0]: boolean;
>s0 : Symbol(s0, Decl(module.ts, 2, 12))
};
=== tests/cases/compiler/main.ts ===
import { c0, c1, s0, T0, T1, T2, T3 } from "./module";
>c0 : Symbol(c0, Decl(main.ts, 0, 8))
>c1 : Symbol(c1, Decl(main.ts, 0, 12))
>s0 : Symbol(s0, Decl(main.ts, 0, 16))
>T0 : Symbol(T0, Decl(main.ts, 0, 20))
>T1 : Symbol(T1, Decl(main.ts, 0, 24))
>T2 : Symbol(T2, Decl(main.ts, 0, 28))
>T3 : Symbol(T3, Decl(main.ts, 0, 32))
import * as M from "./module";
>M : Symbol(M, Decl(main.ts, 1, 6))
namespace N {
>N : Symbol(N, Decl(main.ts, 1, 30))
export const c2 = "a";
>c2 : Symbol(c2, Decl(main.ts, 4, 16))
export const c3 = 1;
>c3 : Symbol(c3, Decl(main.ts, 5, 16))
export const s1: typeof s0 = s0;
>s1 : Symbol(s1, Decl(main.ts, 6, 16))
>s0 : Symbol(s0, Decl(main.ts, 0, 16))
>s0 : Symbol(s0, Decl(main.ts, 0, 16))
export interface T4 {
>T4 : Symbol(T4, Decl(main.ts, 6, 36))
[N.c2]: number;
>N.c2 : Symbol(c2, Decl(main.ts, 4, 16))
>N : Symbol(N, Decl(main.ts, 1, 30))
>c2 : Symbol(c2, Decl(main.ts, 4, 16))
[N.c3]: string;
>N.c3 : Symbol(c3, Decl(main.ts, 5, 16))
>N : Symbol(N, Decl(main.ts, 1, 30))
>c3 : Symbol(c3, Decl(main.ts, 5, 16))
[N.s1]: boolean;
>N.s1 : Symbol(s1, Decl(main.ts, 6, 16))
>N : Symbol(N, Decl(main.ts, 1, 30))
>s1 : Symbol(s1, Decl(main.ts, 6, 16))
}
export declare class T5 implements T4 {
>T5 : Symbol(T5, Decl(main.ts, 12, 5))
>T4 : Symbol(T4, Decl(main.ts, 6, 36))
[N.c2]: number;
>N.c2 : Symbol(c2, Decl(main.ts, 4, 16))
>N : Symbol(N, Decl(main.ts, 1, 30))
>c2 : Symbol(c2, Decl(main.ts, 4, 16))
[N.c3]: string;
>N.c3 : Symbol(c3, Decl(main.ts, 5, 16))
>N : Symbol(N, Decl(main.ts, 1, 30))
>c3 : Symbol(c3, Decl(main.ts, 5, 16))
[N.s1]: boolean;
>N.s1 : Symbol(s1, Decl(main.ts, 6, 16))
>N : Symbol(N, Decl(main.ts, 1, 30))
>s1 : Symbol(s1, Decl(main.ts, 6, 16))
}
export declare class T6 extends T5 {
>T6 : Symbol(T6, Decl(main.ts, 17, 5))
>T5 : Symbol(T5, Decl(main.ts, 12, 5))
}
export declare type T7 = {
>T7 : Symbol(T7, Decl(main.ts, 19, 5))
[N.c2]: number;
>N.c2 : Symbol(c2, Decl(main.ts, 4, 16))
>N : Symbol(N, Decl(main.ts, 1, 30))
>c2 : Symbol(c2, Decl(main.ts, 4, 16))
[N.c3]: string;
>N.c3 : Symbol(c3, Decl(main.ts, 5, 16))
>N : Symbol(N, Decl(main.ts, 1, 30))
>c3 : Symbol(c3, Decl(main.ts, 5, 16))
[N.s1]: boolean;
>N.s1 : Symbol(s1, Decl(main.ts, 6, 16))
>N : Symbol(N, Decl(main.ts, 1, 30))
>s1 : Symbol(s1, Decl(main.ts, 6, 16))
};
}
export const c4 = "a";
>c4 : Symbol(c4, Decl(main.ts, 27, 12))
export const c5 = 1;
>c5 : Symbol(c5, Decl(main.ts, 28, 12))
export const s2: typeof s0 = s0;
>s2 : Symbol(s2, Decl(main.ts, 29, 12))
>s0 : Symbol(s0, Decl(main.ts, 0, 16))
>s0 : Symbol(s0, Decl(main.ts, 0, 16))
interface T8 {
>T8 : Symbol(T8, Decl(main.ts, 29, 32))
[c4]: number;
>c4 : Symbol(c4, Decl(main.ts, 27, 12))
[c5]: string;
>c5 : Symbol(c5, Decl(main.ts, 28, 12))
[s2]: boolean;
>s2 : Symbol(s2, Decl(main.ts, 29, 12))
}
declare class T9 implements T8 {
>T9 : Symbol(T9, Decl(main.ts, 35, 1))
>T8 : Symbol(T8, Decl(main.ts, 29, 32))
[c4]: number;
>c4 : Symbol(c4, Decl(main.ts, 27, 12))
[c5]: string;
>c5 : Symbol(c5, Decl(main.ts, 28, 12))
[s2]: boolean;
>s2 : Symbol(s2, Decl(main.ts, 29, 12))
}
declare class T10 extends T9 {
>T10 : Symbol(T10, Decl(main.ts, 40, 1))
>T9 : Symbol(T9, Decl(main.ts, 35, 1))
}
declare type T11 = {
>T11 : Symbol(T11, Decl(main.ts, 42, 1))
[c4]: number;
>c4 : Symbol(c4, Decl(main.ts, 27, 12))
[c5]: string;
>c5 : Symbol(c5, Decl(main.ts, 28, 12))
[s2]: boolean;
>s2 : Symbol(s2, Decl(main.ts, 29, 12))
};
interface T12 {
>T12 : Symbol(T12, Decl(main.ts, 47, 2))
a: number;
>a : Symbol(T12.a, Decl(main.ts, 49, 15))
1: string;
[s2]: boolean;
>s2 : Symbol(s2, Decl(main.ts, 29, 12))
}
declare class T13 implements T2 {
>T13 : Symbol(T13, Decl(main.ts, 53, 1))
>T2 : Symbol(T2, Decl(main.ts, 0, 28))
a: number;
>a : Symbol(T13.a, Decl(main.ts, 54, 33))
1: string;
[s2]: boolean;
>s2 : Symbol(s2, Decl(main.ts, 29, 12))
}
declare class T14 extends T13 {
>T14 : Symbol(T14, Decl(main.ts, 58, 1))
>T13 : Symbol(T13, Decl(main.ts, 53, 1))
}
declare type T15 = {
>T15 : Symbol(T15, Decl(main.ts, 60, 1))
a: number;
>a : Symbol(a, Decl(main.ts, 61, 20))
1: string;
[s2]: boolean;
>s2 : Symbol(s2, Decl(main.ts, 29, 12))
};
declare class C {
>C : Symbol(C, Decl(main.ts, 65, 2))
static a: number;
>a : Symbol(C.a, Decl(main.ts, 67, 17))
static 1: string;
static [s2]: boolean;
>s2 : Symbol(s2, Decl(main.ts, 29, 12))
}
let t0: T0;
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>T0 : Symbol(T0, Decl(main.ts, 0, 20))
let t1: T1;
>t1 : Symbol(t1, Decl(main.ts, 74, 3))
>T1 : Symbol(T1, Decl(main.ts, 0, 24))
let t2: T2;
>t2 : Symbol(t2, Decl(main.ts, 75, 3))
>T2 : Symbol(T2, Decl(main.ts, 0, 28))
let t3: T3;
>t3 : Symbol(t3, Decl(main.ts, 76, 3))
>T3 : Symbol(T3, Decl(main.ts, 0, 32))
let t0_1: M.T0;
>t0_1 : Symbol(t0_1, Decl(main.ts, 77, 3))
>M : Symbol(M, Decl(main.ts, 1, 6))
>T0 : Symbol(T0, Decl(module.ts, 2, 27))
let t1_1: M.T1;
>t1_1 : Symbol(t1_1, Decl(main.ts, 78, 3))
>M : Symbol(M, Decl(main.ts, 1, 6))
>T1 : Symbol(T1, Decl(module.ts, 7, 1))
let t2_1: M.T2;
>t2_1 : Symbol(t2_1, Decl(main.ts, 79, 3))
>M : Symbol(M, Decl(main.ts, 1, 6))
>T2 : Symbol(T2, Decl(module.ts, 12, 1))
let t3_1: M.T3;
>t3_1 : Symbol(t3_1, Decl(main.ts, 80, 3))
>M : Symbol(M, Decl(main.ts, 1, 6))
>T3 : Symbol(T3, Decl(module.ts, 14, 1))
let t4: N.T4;
>t4 : Symbol(t4, Decl(main.ts, 81, 3))
>N : Symbol(N, Decl(main.ts, 1, 30))
>T4 : Symbol(N.T4, Decl(main.ts, 6, 36))
let t5: N.T5;
>t5 : Symbol(t5, Decl(main.ts, 82, 3))
>N : Symbol(N, Decl(main.ts, 1, 30))
>T5 : Symbol(N.T5, Decl(main.ts, 12, 5))
let t6: N.T6;
>t6 : Symbol(t6, Decl(main.ts, 83, 3))
>N : Symbol(N, Decl(main.ts, 1, 30))
>T6 : Symbol(N.T6, Decl(main.ts, 17, 5))
let t7: N.T7;
>t7 : Symbol(t7, Decl(main.ts, 84, 3))
>N : Symbol(N, Decl(main.ts, 1, 30))
>T7 : Symbol(N.T7, Decl(main.ts, 19, 5))
let t8: T8;
>t8 : Symbol(t8, Decl(main.ts, 85, 3))
>T8 : Symbol(T8, Decl(main.ts, 29, 32))
let t9: T9;
>t9 : Symbol(t9, Decl(main.ts, 86, 3))
>T9 : Symbol(T9, Decl(main.ts, 35, 1))
let t10: T10;
>t10 : Symbol(t10, Decl(main.ts, 87, 3))
>T10 : Symbol(T10, Decl(main.ts, 40, 1))
let t11: T11;
>t11 : Symbol(t11, Decl(main.ts, 88, 3))
>T11 : Symbol(T11, Decl(main.ts, 42, 1))
let t12: T12;
>t12 : Symbol(t12, Decl(main.ts, 89, 3))
>T12 : Symbol(T12, Decl(main.ts, 47, 2))
let t13: T13;
>t13 : Symbol(t13, Decl(main.ts, 90, 3))
>T13 : Symbol(T13, Decl(main.ts, 53, 1))
let t14: T14;
>t14 : Symbol(t14, Decl(main.ts, 91, 3))
>T14 : Symbol(T14, Decl(main.ts, 58, 1))
let t15: T15;
>t15 : Symbol(t15, Decl(main.ts, 92, 3))
>T15 : Symbol(T15, Decl(main.ts, 60, 1))
// assignability
t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3, t3 = t0, t3 = t1, t3 = t2;
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>t1 : Symbol(t1, Decl(main.ts, 74, 3))
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>t2 : Symbol(t2, Decl(main.ts, 75, 3))
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>t3 : Symbol(t3, Decl(main.ts, 76, 3))
>t1 : Symbol(t1, Decl(main.ts, 74, 3))
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>t1 : Symbol(t1, Decl(main.ts, 74, 3))
>t2 : Symbol(t2, Decl(main.ts, 75, 3))
>t1 : Symbol(t1, Decl(main.ts, 74, 3))
>t3 : Symbol(t3, Decl(main.ts, 76, 3))
>t2 : Symbol(t2, Decl(main.ts, 75, 3))
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>t2 : Symbol(t2, Decl(main.ts, 75, 3))
>t1 : Symbol(t1, Decl(main.ts, 74, 3))
>t2 : Symbol(t2, Decl(main.ts, 75, 3))
>t3 : Symbol(t3, Decl(main.ts, 76, 3))
>t3 : Symbol(t3, Decl(main.ts, 76, 3))
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>t3 : Symbol(t3, Decl(main.ts, 76, 3))
>t1 : Symbol(t1, Decl(main.ts, 74, 3))
>t3 : Symbol(t3, Decl(main.ts, 76, 3))
>t2 : Symbol(t2, Decl(main.ts, 75, 3))
t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5, t7 = t6;
>t4 : Symbol(t4, Decl(main.ts, 81, 3))
>t5 : Symbol(t5, Decl(main.ts, 82, 3))
>t4 : Symbol(t4, Decl(main.ts, 81, 3))
>t6 : Symbol(t6, Decl(main.ts, 83, 3))
>t4 : Symbol(t4, Decl(main.ts, 81, 3))
>t7 : Symbol(t7, Decl(main.ts, 84, 3))
>t5 : Symbol(t5, Decl(main.ts, 82, 3))
>t4 : Symbol(t4, Decl(main.ts, 81, 3))
>t5 : Symbol(t5, Decl(main.ts, 82, 3))
>t6 : Symbol(t6, Decl(main.ts, 83, 3))
>t5 : Symbol(t5, Decl(main.ts, 82, 3))
>t7 : Symbol(t7, Decl(main.ts, 84, 3))
>t6 : Symbol(t6, Decl(main.ts, 83, 3))
>t4 : Symbol(t4, Decl(main.ts, 81, 3))
>t6 : Symbol(t6, Decl(main.ts, 83, 3))
>t5 : Symbol(t5, Decl(main.ts, 82, 3))
>t6 : Symbol(t6, Decl(main.ts, 83, 3))
>t7 : Symbol(t7, Decl(main.ts, 84, 3))
>t7 : Symbol(t7, Decl(main.ts, 84, 3))
>t4 : Symbol(t4, Decl(main.ts, 81, 3))
>t7 : Symbol(t7, Decl(main.ts, 84, 3))
>t5 : Symbol(t5, Decl(main.ts, 82, 3))
>t7 : Symbol(t7, Decl(main.ts, 84, 3))
>t6 : Symbol(t6, Decl(main.ts, 83, 3))
t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0, t14 = t0, t15 = t0;
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>t12 : Symbol(t12, Decl(main.ts, 89, 3))
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>t13 : Symbol(t13, Decl(main.ts, 90, 3))
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>t14 : Symbol(t14, Decl(main.ts, 91, 3))
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>t15 : Symbol(t15, Decl(main.ts, 92, 3))
>t12 : Symbol(t12, Decl(main.ts, 89, 3))
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>t13 : Symbol(t13, Decl(main.ts, 90, 3))
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>t14 : Symbol(t14, Decl(main.ts, 91, 3))
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>t15 : Symbol(t15, Decl(main.ts, 92, 3))
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
t0 = C; // static side
>t0 : Symbol(t0, Decl(main.ts, 73, 3))
>C : Symbol(C, Decl(main.ts, 65, 2))
// object literals
export const o1 = {
>o1 : Symbol(o1, Decl(main.ts, 101, 12))
[c4]: 1,
>c4 : Symbol(c4, Decl(main.ts, 27, 12))
[c5]: "a",
>c5 : Symbol(c5, Decl(main.ts, 28, 12))
[s2]: true
>s2 : Symbol(s2, Decl(main.ts, 29, 12))
};
// check element access types
export const o1_c4 = o1[c4];
>o1_c4 : Symbol(o1_c4, Decl(main.ts, 108, 12))
>o1 : Symbol(o1, Decl(main.ts, 101, 12))
>c4 : Symbol(c4, Decl(main.ts, 27, 12))
export const o1_c5 = o1[c5];
>o1_c5 : Symbol(o1_c5, Decl(main.ts, 109, 12))
>o1 : Symbol(o1, Decl(main.ts, 101, 12))
>c5 : Symbol(c5, Decl(main.ts, 28, 12))
export const o1_s2 = o1[s2];
>o1_s2 : Symbol(o1_s2, Decl(main.ts, 110, 12))
>o1 : Symbol(o1, Decl(main.ts, 101, 12))
>s2 : Symbol(s2, Decl(main.ts, 29, 12))
export const o2: T0 = o1;
>o2 : Symbol(o2, Decl(main.ts, 112, 12))
>T0 : Symbol(T0, Decl(main.ts, 0, 20))
>o1 : Symbol(o1, Decl(main.ts, 101, 12))
// recursive declarations
declare const rI: RI;
>rI : Symbol(rI, Decl(main.ts, 115, 13))
>RI : Symbol(RI, Decl(main.ts, 115, 21))
interface RI {
>RI : Symbol(RI, Decl(main.ts, 115, 21))
x: "a";
>x : Symbol(RI.x, Decl(main.ts, 116, 14))
[rI.x]: "b";
>rI.x : Symbol(RI.x, Decl(main.ts, 116, 14))
>rI : Symbol(rI, Decl(main.ts, 115, 13))
>x : Symbol(RI.x, Decl(main.ts, 116, 14))
}
declare const rC: RC;
>rC : Symbol(rC, Decl(main.ts, 121, 13))
>RC : Symbol(RC, Decl(main.ts, 121, 21))
declare class RC {
>RC : Symbol(RC, Decl(main.ts, 121, 21))
x: "a";
>x : Symbol(RC.x, Decl(main.ts, 122, 18))
[rC.x]: "b";
>rC.x : Symbol(RC.x, Decl(main.ts, 122, 18))
>rC : Symbol(rC, Decl(main.ts, 121, 13))
>x : Symbol(RC.x, Decl(main.ts, 122, 18))
}
@@ -0,0 +1,552 @@
=== tests/cases/compiler/module.ts ===
export const c0 = "a";
>c0 : "a"
>"a" : "a"
export const c1 = 1;
>c1 : 1
>1 : 1
export const s0 = Symbol();
>s0 : unique symbol
>Symbol() : unique symbol
>Symbol : SymbolConstructor
export interface T0 {
>T0 : T0
[c0]: number;
>c0 : "a"
[c1]: string;
>c1 : 1
[s0]: boolean;
>s0 : unique symbol
}
export declare class T1 implements T2 {
>T1 : T1
>T2 : T2
[c0]: number;
>c0 : "a"
[c1]: string;
>c1 : 1
[s0]: boolean;
>s0 : unique symbol
}
export declare class T2 extends T1 {
>T2 : T2
>T1 : T1
}
export declare type T3 = {
>T3 : T3
[c0]: number;
>c0 : "a"
[c1]: string;
>c1 : 1
[s0]: boolean;
>s0 : unique symbol
};
=== tests/cases/compiler/main.ts ===
import { c0, c1, s0, T0, T1, T2, T3 } from "./module";
>c0 : "a"
>c1 : 1
>s0 : unique symbol
>T0 : any
>T1 : typeof T1
>T2 : typeof T2
>T3 : any
import * as M from "./module";
>M : typeof M
namespace N {
>N : typeof N
export const c2 = "a";
>c2 : "a"
>"a" : "a"
export const c3 = 1;
>c3 : 1
>1 : 1
export const s1: typeof s0 = s0;
>s1 : unique symbol
>s0 : unique symbol
>s0 : unique symbol
export interface T4 {
>T4 : T4
[N.c2]: number;
>N.c2 : "a"
>N : typeof N
>c2 : "a"
[N.c3]: string;
>N.c3 : 1
>N : typeof N
>c3 : 1
[N.s1]: boolean;
>N.s1 : unique symbol
>N : typeof N
>s1 : unique symbol
}
export declare class T5 implements T4 {
>T5 : T5
>T4 : T4
[N.c2]: number;
>N.c2 : "a"
>N : typeof N
>c2 : "a"
[N.c3]: string;
>N.c3 : 1
>N : typeof N
>c3 : 1
[N.s1]: boolean;
>N.s1 : unique symbol
>N : typeof N
>s1 : unique symbol
}
export declare class T6 extends T5 {
>T6 : T6
>T5 : T5
}
export declare type T7 = {
>T7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
[N.c2]: number;
>N.c2 : "a"
>N : typeof N
>c2 : "a"
[N.c3]: string;
>N.c3 : 1
>N : typeof N
>c3 : 1
[N.s1]: boolean;
>N.s1 : unique symbol
>N : typeof N
>s1 : unique symbol
};
}
export const c4 = "a";
>c4 : "a"
>"a" : "a"
export const c5 = 1;
>c5 : 1
>1 : 1
export const s2: typeof s0 = s0;
>s2 : unique symbol
>s0 : unique symbol
>s0 : unique symbol
interface T8 {
>T8 : T8
[c4]: number;
>c4 : "a"
[c5]: string;
>c5 : 1
[s2]: boolean;
>s2 : unique symbol
}
declare class T9 implements T8 {
>T9 : T9
>T8 : T8
[c4]: number;
>c4 : "a"
[c5]: string;
>c5 : 1
[s2]: boolean;
>s2 : unique symbol
}
declare class T10 extends T9 {
>T10 : T10
>T9 : T9
}
declare type T11 = {
>T11 : { [c4]: number; [c5]: string; [s2]: boolean; }
[c4]: number;
>c4 : "a"
[c5]: string;
>c5 : 1
[s2]: boolean;
>s2 : unique symbol
};
interface T12 {
>T12 : T12
a: number;
>a : number
1: string;
[s2]: boolean;
>s2 : unique symbol
}
declare class T13 implements T2 {
>T13 : T13
>T2 : T2
a: number;
>a : number
1: string;
[s2]: boolean;
>s2 : unique symbol
}
declare class T14 extends T13 {
>T14 : T14
>T13 : T13
}
declare type T15 = {
>T15 : { a: number; 1: string; [s2]: boolean; }
a: number;
>a : number
1: string;
[s2]: boolean;
>s2 : unique symbol
};
declare class C {
>C : C
static a: number;
>a : number
static 1: string;
static [s2]: boolean;
>s2 : unique symbol
}
let t0: T0;
>t0 : T0
>T0 : T0
let t1: T1;
>t1 : T1
>T1 : T1
let t2: T2;
>t2 : T2
>T2 : T2
let t3: T3;
>t3 : T3
>T3 : T3
let t0_1: M.T0;
>t0_1 : T0
>M : any
>T0 : T0
let t1_1: M.T1;
>t1_1 : T1
>M : any
>T1 : T1
let t2_1: M.T2;
>t2_1 : T2
>M : any
>T2 : T2
let t3_1: M.T3;
>t3_1 : T3
>M : any
>T3 : T3
let t4: N.T4;
>t4 : N.T4
>N : any
>T4 : N.T4
let t5: N.T5;
>t5 : N.T5
>N : any
>T5 : N.T5
let t6: N.T6;
>t6 : N.T6
>N : any
>T6 : N.T6
let t7: N.T7;
>t7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
>N : any
>T7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
let t8: T8;
>t8 : T8
>T8 : T8
let t9: T9;
>t9 : T9
>T9 : T9
let t10: T10;
>t10 : T10
>T10 : T10
let t11: T11;
>t11 : { [c4]: number; [c5]: string; [s2]: boolean; }
>T11 : { [c4]: number; [c5]: string; [s2]: boolean; }
let t12: T12;
>t12 : T12
>T12 : T12
let t13: T13;
>t13 : T13
>T13 : T13
let t14: T14;
>t14 : T14
>T14 : T14
let t15: T15;
>t15 : { a: number; 1: string; [s2]: boolean; }
>T15 : { a: number; 1: string; [s2]: boolean; }
// assignability
t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3, t3 = t0, t3 = t1, t3 = t2;
>t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3, t3 = t0, t3 = t1, t3 = t2 : T2
>t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3, t3 = t0, t3 = t1 : T1
>t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3, t3 = t0 : T0
>t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1, t2 = t3 : T3
>t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0, t2 = t1 : T1
>t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3, t2 = t0 : T0
>t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2, t1 = t3 : T3
>t0 = t1, t0 = t2, t0 = t3, t1 = t0, t1 = t2 : T2
>t0 = t1, t0 = t2, t0 = t3, t1 = t0 : T0
>t0 = t1, t0 = t2, t0 = t3 : T3
>t0 = t1, t0 = t2 : T2
>t0 = t1 : T1
>t0 : T0
>t1 : T1
>t0 = t2 : T2
>t0 : T0
>t2 : T2
>t0 = t3 : T3
>t0 : T0
>t3 : T3
>t1 = t0 : T0
>t1 : T1
>t0 : T0
>t1 = t2 : T2
>t1 : T1
>t2 : T2
>t1 = t3 : T3
>t1 : T1
>t3 : T3
>t2 = t0 : T0
>t2 : T2
>t0 : T0
>t2 = t1 : T1
>t2 : T2
>t1 : T1
>t2 = t3 : T3
>t2 : T2
>t3 : T3
>t3 = t0 : T0
>t3 : T3
>t0 : T0
>t3 = t1 : T1
>t3 : T3
>t1 : T1
>t3 = t2 : T2
>t3 : T3
>t2 : T2
t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5, t7 = t6;
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5, t7 = t6 : N.T6
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4, t7 = t5 : N.T5
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7, t7 = t4 : N.T4
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5, t6 = t7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4, t6 = t5 : N.T5
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7, t6 = t4 : N.T4
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6, t5 = t7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
>t4 = t5, t4 = t6, t4 = t7, t5 = t4, t5 = t6 : N.T6
>t4 = t5, t4 = t6, t4 = t7, t5 = t4 : N.T4
>t4 = t5, t4 = t6, t4 = t7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
>t4 = t5, t4 = t6 : N.T6
>t4 = t5 : N.T5
>t4 : N.T4
>t5 : N.T5
>t4 = t6 : N.T6
>t4 : N.T4
>t6 : N.T6
>t4 = t7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
>t4 : N.T4
>t7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
>t5 = t4 : N.T4
>t5 : N.T5
>t4 : N.T4
>t5 = t6 : N.T6
>t5 : N.T5
>t6 : N.T6
>t5 = t7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
>t5 : N.T5
>t7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
>t6 = t4 : N.T4
>t6 : N.T6
>t4 : N.T4
>t6 = t5 : N.T5
>t6 : N.T6
>t5 : N.T5
>t6 = t7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
>t6 : N.T6
>t7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
>t7 = t4 : N.T4
>t7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
>t4 : N.T4
>t7 = t5 : N.T5
>t7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
>t5 : N.T5
>t7 = t6 : N.T6
>t7 : { [N.c2]: number; [N.c3]: string; [N.s1]: boolean; }
>t6 : N.T6
t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0, t14 = t0, t15 = t0;
>t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0, t14 = t0, t15 = t0 : T0
>t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0, t14 = t0 : T0
>t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0, t13 = t0 : T0
>t0 = t12, t0 = t13, t0 = t14, t0 = t15, t12 = t0 : T0
>t0 = t12, t0 = t13, t0 = t14, t0 = t15 : { a: number; 1: string; [s2]: boolean; }
>t0 = t12, t0 = t13, t0 = t14 : T14
>t0 = t12, t0 = t13 : T13
>t0 = t12 : T12
>t0 : T0
>t12 : T12
>t0 = t13 : T13
>t0 : T0
>t13 : T13
>t0 = t14 : T14
>t0 : T0
>t14 : T14
>t0 = t15 : { a: number; 1: string; [s2]: boolean; }
>t0 : T0
>t15 : { a: number; 1: string; [s2]: boolean; }
>t12 = t0 : T0
>t12 : T12
>t0 : T0
>t13 = t0 : T0
>t13 : T13
>t0 : T0
>t14 = t0 : T0
>t14 : T14
>t0 : T0
>t15 = t0 : T0
>t15 : { a: number; 1: string; [s2]: boolean; }
>t0 : T0
t0 = C; // static side
>t0 = C : typeof C
>t0 : T0
>C : typeof C
// object literals
export const o1 = {
>o1 : { [c4]: number; [c5]: string; [s2]: boolean; }
>{ [c4]: 1, [c5]: "a", [s2]: true} : { [c4]: number; [c5]: string; [s2]: boolean; }
[c4]: 1,
>c4 : "a"
>1 : 1
[c5]: "a",
>c5 : 1
>"a" : "a"
[s2]: true
>s2 : unique symbol
>true : true
};
// check element access types
export const o1_c4 = o1[c4];
>o1_c4 : number
>o1[c4] : number
>o1 : { [c4]: number; [c5]: string; [s2]: boolean; }
>c4 : "a"
export const o1_c5 = o1[c5];
>o1_c5 : string
>o1[c5] : string
>o1 : { [c4]: number; [c5]: string; [s2]: boolean; }
>c5 : 1
export const o1_s2 = o1[s2];
>o1_s2 : boolean
>o1[s2] : boolean
>o1 : { [c4]: number; [c5]: string; [s2]: boolean; }
>s2 : unique symbol
export const o2: T0 = o1;
>o2 : T0
>T0 : T0
>o1 : { [c4]: number; [c5]: string; [s2]: boolean; }
// recursive declarations
declare const rI: RI;
>rI : RI
>RI : RI
interface RI {
>RI : RI
x: "a";
>x : "a"
[rI.x]: "b";
>rI.x : "a"
>rI : RI
>x : "a"
}
declare const rC: RC;
>rC : RC
>RC : RC
declare class RC {
>RC : RC
x: "a";
>x : "a"
[rC.x]: "b";
>rC.x : "a"
>rC : RC
>x : "a"
}
@@ -0,0 +1,133 @@
tests/cases/compiler/dynamicNamesErrors.ts(5,5): error TS2718: Duplicate declaration '[c0]'.
tests/cases/compiler/dynamicNamesErrors.ts(6,5): error TS2718: Duplicate declaration '[c0]'.
tests/cases/compiler/dynamicNamesErrors.ts(19,5): error TS2717: Subsequent property declarations must have the same type. Property '[c1]' has type 'number' at tests/cases/compiler/dynamicNamesErrors.ts 17:4, but here has type 'string'.
tests/cases/compiler/dynamicNamesErrors.ts(24,1): error TS2322: Type 'T2' is not assignable to type 'T1'.
Types of property '[c0]' are incompatible.
Type 'string' is not assignable to type 'number'.
tests/cases/compiler/dynamicNamesErrors.ts(25,1): error TS2322: Type 'T1' is not assignable to type 'T2'.
Types of property '[c0]' are incompatible.
Type 'number' is not assignable to type 'string'.
tests/cases/compiler/dynamicNamesErrors.ts(33,6): error TS4033: Property '[x]' of exported interface has or is using private name 'x'.
tests/cases/compiler/dynamicNamesErrors.ts(34,6): error TS4102: Method '[y]' of exported interface has or is using private name 'y'.
tests/cases/compiler/dynamicNamesErrors.ts(38,13): error TS4028: Public static property '[x]' of exported class has or is using private name 'x'.
tests/cases/compiler/dynamicNamesErrors.ts(39,13): error TS4097: Public static method '[y]' of exported class has or is using private name 'y'.
tests/cases/compiler/dynamicNamesErrors.ts(40,17): error TS4028: Public static property '[z]' of exported class has or is using private name 'z'.
tests/cases/compiler/dynamicNamesErrors.ts(41,17): error TS4028: Public static property '[w]' of exported class has or is using private name 'w'.
tests/cases/compiler/dynamicNamesErrors.ts(43,6): error TS4031: Public property '[x]' of exported class has or is using private name 'x'.
tests/cases/compiler/dynamicNamesErrors.ts(44,6): error TS4100: Public method '[y]' of exported class has or is using private name 'y'.
tests/cases/compiler/dynamicNamesErrors.ts(45,10): error TS4031: Public property '[z]' of exported class has or is using private name 'z'.
tests/cases/compiler/dynamicNamesErrors.ts(46,10): error TS4031: Public property '[w]' of exported class has or is using private name 'w'.
tests/cases/compiler/dynamicNamesErrors.ts(50,6): error TS4033: Property '[x]' of exported interface has or is using private name 'x'.
tests/cases/compiler/dynamicNamesErrors.ts(51,6): error TS4102: Method '[y]' of exported interface has or is using private name 'y'.
tests/cases/compiler/dynamicNamesErrors.ts(54,14): error TS4025: Exported variable 'ObjectLiteralVisibility' has or is using private name 'w'.
tests/cases/compiler/dynamicNamesErrors.ts(54,14): error TS4025: Exported variable 'ObjectLiteralVisibility' has or is using private name 'x'.
tests/cases/compiler/dynamicNamesErrors.ts(54,14): error TS4025: Exported variable 'ObjectLiteralVisibility' has or is using private name 'y'.
tests/cases/compiler/dynamicNamesErrors.ts(54,14): error TS4025: Exported variable 'ObjectLiteralVisibility' has or is using private name 'z'.
==== tests/cases/compiler/dynamicNamesErrors.ts (21 errors) ====
const c0 = "1";
const c1 = 1;
interface T0 {
[c0]: number;
~~~~
!!! error TS2718: Duplicate declaration '[c0]'.
1: number;
~
!!! error TS2718: Duplicate declaration '[c0]'.
}
interface T1 {
[c0]: number;
}
interface T2 {
[c0]: string;
}
interface T3 {
[c0]: number;
[c1]: string;
~~~~
!!! error TS2717: Subsequent property declarations must have the same type. Property '[c1]' has type 'number' at tests/cases/compiler/dynamicNamesErrors.ts 17:4, but here has type 'string'.
}
let t1: T1;
let t2: T2;
t1 = t2;
~~
!!! error TS2322: Type 'T2' is not assignable to type 'T1'.
!!! error TS2322: Types of property '[c0]' are incompatible.
!!! error TS2322: Type 'string' is not assignable to type 'number'.
t2 = t1;
~~
!!! error TS2322: Type 'T1' is not assignable to type 'T2'.
!!! error TS2322: Types of property '[c0]' are incompatible.
!!! error TS2322: Type 'number' is not assignable to type 'string'.
const x = Symbol();
const y = Symbol();
const z = Symbol();
const w = Symbol();
export interface InterfaceMemberVisibility {
[x]: number;
~
!!! error TS4033: Property '[x]' of exported interface has or is using private name 'x'.
[y](): number;
~
!!! error TS4102: Method '[y]' of exported interface has or is using private name 'y'.
}
export class ClassMemberVisibility {
static [x]: number;
~
!!! error TS4028: Public static property '[x]' of exported class has or is using private name 'x'.
static [y](): number { return 0; }
~
!!! error TS4097: Public static method '[y]' of exported class has or is using private name 'y'.
static get [z](): number { return 0; }
~
!!! error TS4028: Public static property '[z]' of exported class has or is using private name 'z'.
static set [w](value: number) { }
~
!!! error TS4028: Public static property '[w]' of exported class has or is using private name 'w'.
[x]: number;
~
!!! error TS4031: Public property '[x]' of exported class has or is using private name 'x'.
[y](): number { return 0; }
~
!!! error TS4100: Public method '[y]' of exported class has or is using private name 'y'.
get [z](): number { return 0; }
~
!!! error TS4031: Public property '[z]' of exported class has or is using private name 'z'.
set [w](value: number) { }
~
!!! error TS4031: Public property '[w]' of exported class has or is using private name 'w'.
}
export type ObjectTypeVisibility = {
[x]: number;
~
!!! error TS4033: Property '[x]' of exported interface has or is using private name 'x'.
[y](): number;
~
!!! error TS4102: Method '[y]' of exported interface has or is using private name 'y'.
};
export const ObjectLiteralVisibility = {
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4025: Exported variable 'ObjectLiteralVisibility' has or is using private name 'w'.
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4025: Exported variable 'ObjectLiteralVisibility' has or is using private name 'x'.
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4025: Exported variable 'ObjectLiteralVisibility' has or is using private name 'y'.
~~~~~~~~~~~~~~~~~~~~~~~
!!! error TS4025: Exported variable 'ObjectLiteralVisibility' has or is using private name 'z'.
[x]: 0,
[y](): number { return 0; },
get [z](): number { return 0; },
set [w](value: number) { },
};
@@ -0,0 +1,89 @@
//// [dynamicNamesErrors.ts]
const c0 = "1";
const c1 = 1;
interface T0 {
[c0]: number;
1: number;
}
interface T1 {
[c0]: number;
}
interface T2 {
[c0]: string;
}
interface T3 {
[c0]: number;
[c1]: string;
}
let t1: T1;
let t2: T2;
t1 = t2;
t2 = t1;
const x = Symbol();
const y = Symbol();
const z = Symbol();
const w = Symbol();
export interface InterfaceMemberVisibility {
[x]: number;
[y](): number;
}
export class ClassMemberVisibility {
static [x]: number;
static [y](): number { return 0; }
static get [z](): number { return 0; }
static set [w](value: number) { }
[x]: number;
[y](): number { return 0; }
get [z](): number { return 0; }
set [w](value: number) { }
}
export type ObjectTypeVisibility = {
[x]: number;
[y](): number;
};
export const ObjectLiteralVisibility = {
[x]: 0,
[y](): number { return 0; },
get [z](): number { return 0; },
set [w](value: number) { },
};
//// [dynamicNamesErrors.js]
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const c0 = "1";
const c1 = 1;
let t1;
let t2;
t1 = t2;
t2 = t1;
const x = Symbol();
const y = Symbol();
const z = Symbol();
const w = Symbol();
class ClassMemberVisibility {
static [y]() { return 0; }
static get [z]() { return 0; }
static set [w](value) { }
[y]() { return 0; }
get [z]() { return 0; }
set [w](value) { }
}
exports.ClassMemberVisibility = ClassMemberVisibility;
exports.ObjectLiteralVisibility = {
[x]: 0,
[y]() { return 0; },
get [z]() { return 0; },
set [w](value) { },
};
@@ -0,0 +1,140 @@
=== tests/cases/compiler/dynamicNamesErrors.ts ===
const c0 = "1";
>c0 : Symbol(c0, Decl(dynamicNamesErrors.ts, 0, 5))
const c1 = 1;
>c1 : Symbol(c1, Decl(dynamicNamesErrors.ts, 1, 5))
interface T0 {
>T0 : Symbol(T0, Decl(dynamicNamesErrors.ts, 1, 13))
[c0]: number;
>c0 : Symbol(c0, Decl(dynamicNamesErrors.ts, 0, 5))
1: number;
}
interface T1 {
>T1 : Symbol(T1, Decl(dynamicNamesErrors.ts, 6, 1))
[c0]: number;
>c0 : Symbol(c0, Decl(dynamicNamesErrors.ts, 0, 5))
}
interface T2 {
>T2 : Symbol(T2, Decl(dynamicNamesErrors.ts, 10, 1))
[c0]: string;
>c0 : Symbol(c0, Decl(dynamicNamesErrors.ts, 0, 5))
}
interface T3 {
>T3 : Symbol(T3, Decl(dynamicNamesErrors.ts, 14, 1))
[c0]: number;
>c0 : Symbol(c0, Decl(dynamicNamesErrors.ts, 0, 5))
[c1]: string;
>c1 : Symbol(c1, Decl(dynamicNamesErrors.ts, 1, 5))
}
let t1: T1;
>t1 : Symbol(t1, Decl(dynamicNamesErrors.ts, 21, 3))
>T1 : Symbol(T1, Decl(dynamicNamesErrors.ts, 6, 1))
let t2: T2;
>t2 : Symbol(t2, Decl(dynamicNamesErrors.ts, 22, 3))
>T2 : Symbol(T2, Decl(dynamicNamesErrors.ts, 10, 1))
t1 = t2;
>t1 : Symbol(t1, Decl(dynamicNamesErrors.ts, 21, 3))
>t2 : Symbol(t2, Decl(dynamicNamesErrors.ts, 22, 3))
t2 = t1;
>t2 : Symbol(t2, Decl(dynamicNamesErrors.ts, 22, 3))
>t1 : Symbol(t1, Decl(dynamicNamesErrors.ts, 21, 3))
const x = Symbol();
>x : Symbol(x, Decl(dynamicNamesErrors.ts, 26, 5))
>Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --))
const y = Symbol();
>y : Symbol(y, Decl(dynamicNamesErrors.ts, 27, 5))
>Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --))
const z = Symbol();
>z : Symbol(z, Decl(dynamicNamesErrors.ts, 28, 5))
>Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --))
const w = Symbol();
>w : Symbol(w, Decl(dynamicNamesErrors.ts, 29, 5))
>Symbol : Symbol(Symbol, Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --), Decl(lib.es2015.symbol.d.ts, --, --))
export interface InterfaceMemberVisibility {
>InterfaceMemberVisibility : Symbol(InterfaceMemberVisibility, Decl(dynamicNamesErrors.ts, 29, 19))
[x]: number;
>x : Symbol(x, Decl(dynamicNamesErrors.ts, 26, 5))
[y](): number;
>y : Symbol(y, Decl(dynamicNamesErrors.ts, 27, 5))
}
export class ClassMemberVisibility {
>ClassMemberVisibility : Symbol(ClassMemberVisibility, Decl(dynamicNamesErrors.ts, 34, 1))
static [x]: number;
>x : Symbol(x, Decl(dynamicNamesErrors.ts, 26, 5))
static [y](): number { return 0; }
>y : Symbol(y, Decl(dynamicNamesErrors.ts, 27, 5))
static get [z](): number { return 0; }
>z : Symbol(z, Decl(dynamicNamesErrors.ts, 28, 5))
static set [w](value: number) { }
>w : Symbol(w, Decl(dynamicNamesErrors.ts, 29, 5))
>value : Symbol(value, Decl(dynamicNamesErrors.ts, 40, 19))
[x]: number;
>x : Symbol(x, Decl(dynamicNamesErrors.ts, 26, 5))
[y](): number { return 0; }
>y : Symbol(y, Decl(dynamicNamesErrors.ts, 27, 5))
get [z](): number { return 0; }
>z : Symbol(z, Decl(dynamicNamesErrors.ts, 28, 5))
set [w](value: number) { }
>w : Symbol(w, Decl(dynamicNamesErrors.ts, 29, 5))
>value : Symbol(value, Decl(dynamicNamesErrors.ts, 45, 12))
}
export type ObjectTypeVisibility = {
>ObjectTypeVisibility : Symbol(ObjectTypeVisibility, Decl(dynamicNamesErrors.ts, 46, 1))
[x]: number;
>x : Symbol(x, Decl(dynamicNamesErrors.ts, 26, 5))
[y](): number;
>y : Symbol(y, Decl(dynamicNamesErrors.ts, 27, 5))
};
export const ObjectLiteralVisibility = {
>ObjectLiteralVisibility : Symbol(ObjectLiteralVisibility, Decl(dynamicNamesErrors.ts, 53, 12))
[x]: 0,
>x : Symbol(x, Decl(dynamicNamesErrors.ts, 26, 5))
[y](): number { return 0; },
>y : Symbol(y, Decl(dynamicNamesErrors.ts, 27, 5))
get [z](): number { return 0; },
>z : Symbol(z, Decl(dynamicNamesErrors.ts, 28, 5))
set [w](value: number) { },
>w : Symbol(w, Decl(dynamicNamesErrors.ts, 29, 5))
>value : Symbol(value, Decl(dynamicNamesErrors.ts, 57, 12))
};
@@ -0,0 +1,156 @@
=== tests/cases/compiler/dynamicNamesErrors.ts ===
const c0 = "1";
>c0 : "1"
>"1" : "1"
const c1 = 1;
>c1 : 1
>1 : 1
interface T0 {
>T0 : T0
[c0]: number;
>c0 : "1"
1: number;
}
interface T1 {
>T1 : T1
[c0]: number;
>c0 : "1"
}
interface T2 {
>T2 : T2
[c0]: string;
>c0 : "1"
}
interface T3 {
>T3 : T3
[c0]: number;
>c0 : "1"
[c1]: string;
>c1 : 1
}
let t1: T1;
>t1 : T1
>T1 : T1
let t2: T2;
>t2 : T2
>T2 : T2
t1 = t2;
>t1 = t2 : T2
>t1 : T1
>t2 : T2
t2 = t1;
>t2 = t1 : T1
>t2 : T2
>t1 : T1
const x = Symbol();
>x : unique symbol
>Symbol() : unique symbol
>Symbol : SymbolConstructor
const y = Symbol();
>y : unique symbol
>Symbol() : unique symbol
>Symbol : SymbolConstructor
const z = Symbol();
>z : unique symbol
>Symbol() : unique symbol
>Symbol : SymbolConstructor
const w = Symbol();
>w : unique symbol
>Symbol() : unique symbol
>Symbol : SymbolConstructor
export interface InterfaceMemberVisibility {
>InterfaceMemberVisibility : InterfaceMemberVisibility
[x]: number;
>x : unique symbol
[y](): number;
>y : unique symbol
}
export class ClassMemberVisibility {
>ClassMemberVisibility : ClassMemberVisibility
static [x]: number;
>x : unique symbol
static [y](): number { return 0; }
>y : unique symbol
>0 : 0
static get [z](): number { return 0; }
>z : unique symbol
>0 : 0
static set [w](value: number) { }
>w : unique symbol
>value : number
[x]: number;
>x : unique symbol
[y](): number { return 0; }
>y : unique symbol
>0 : 0
get [z](): number { return 0; }
>z : unique symbol
>0 : 0
set [w](value: number) { }
>w : unique symbol
>value : number
}
export type ObjectTypeVisibility = {
>ObjectTypeVisibility : ObjectTypeVisibility
[x]: number;
>x : unique symbol
[y](): number;
>y : unique symbol
};
export const ObjectLiteralVisibility = {
>ObjectLiteralVisibility : { [x]: number; [y](): number; readonly [z]: number; [w]: number; }
>{ [x]: 0, [y](): number { return 0; }, get [z](): number { return 0; }, set [w](value: number) { },} : { [x]: number; [y](): number; readonly [z]: number; [w]: number; }
[x]: 0,
>x : unique symbol
>0 : 0
[y](): number { return 0; },
>y : unique symbol
>0 : 0
get [z](): number { return 0; },
>z : unique symbol
>0 : 0
set [w](value: number) { },
>w : unique symbol
>value : number
};
@@ -19,27 +19,27 @@ class C {
return "BYE";
}
static get ["computedname"]() {
>"computedname" : Symbol(C[["computedname"]], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 7, 5), Decl(emitClassDeclarationWithGetterSetterInES6.ts, 24, 33))
>"computedname" : Symbol(C["computedname"], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 7, 5), Decl(emitClassDeclarationWithGetterSetterInES6.ts, 24, 33))
return "";
}
get ["computedname1"]() {
>"computedname1" : Symbol(C[["computedname1"]], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 10, 5))
>"computedname1" : Symbol(C["computedname1"], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 10, 5))
return "";
}
get ["computedname2"]() {
>"computedname2" : Symbol(C[["computedname2"]], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 13, 5))
>"computedname2" : Symbol(C["computedname2"], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 13, 5))
return "";
}
set ["computedname3"](x: any) {
>"computedname3" : Symbol(C[["computedname3"]], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 16, 5))
>"computedname3" : Symbol(C["computedname3"], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 16, 5))
>x : Symbol(x, Decl(emitClassDeclarationWithGetterSetterInES6.ts, 18, 26))
}
set ["computedname4"](y: string) {
>"computedname4" : Symbol(C[["computedname4"]], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 19, 5))
>"computedname4" : Symbol(C["computedname4"], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 19, 5))
>y : Symbol(y, Decl(emitClassDeclarationWithGetterSetterInES6.ts, 20, 26))
}
@@ -52,6 +52,6 @@ class C {
>b : Symbol(b, Decl(emitClassDeclarationWithGetterSetterInES6.ts, 24, 19))
static set ["computedname"](b: string) { }
>"computedname" : Symbol(C[["computedname"]], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 7, 5), Decl(emitClassDeclarationWithGetterSetterInES6.ts, 24, 33))
>"computedname" : Symbol(C["computedname"], Decl(emitClassDeclarationWithGetterSetterInES6.ts, 7, 5), Decl(emitClassDeclarationWithGetterSetterInES6.ts, 24, 33))
>b : Symbol(b, Decl(emitClassDeclarationWithGetterSetterInES6.ts, 25, 32))
}
@@ -9,14 +9,14 @@ class D {
>foo : Symbol(D.foo, Decl(emitClassDeclarationWithMethodInES6.ts, 1, 17))
["computedName1"]() { }
>"computedName1" : Symbol(D[["computedName1"]], Decl(emitClassDeclarationWithMethodInES6.ts, 2, 13))
>"computedName1" : Symbol(D["computedName1"], Decl(emitClassDeclarationWithMethodInES6.ts, 2, 13))
["computedName2"](a: string) { }
>"computedName2" : Symbol(D[["computedName2"]], Decl(emitClassDeclarationWithMethodInES6.ts, 3, 27))
>"computedName2" : Symbol(D["computedName2"], Decl(emitClassDeclarationWithMethodInES6.ts, 3, 27))
>a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 4, 22))
["computedName3"](a: string): number { return 1; }
>"computedName3" : Symbol(D[["computedName3"]], Decl(emitClassDeclarationWithMethodInES6.ts, 4, 36))
>"computedName3" : Symbol(D["computedName3"], Decl(emitClassDeclarationWithMethodInES6.ts, 4, 36))
>a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 5, 22))
bar(): string {
@@ -35,14 +35,14 @@ class D {
return "HELLO";
}
static ["computedname4"]() { }
>"computedname4" : Symbol(D[["computedname4"]], Decl(emitClassDeclarationWithMethodInES6.ts, 11, 5))
>"computedname4" : Symbol(D["computedname4"], Decl(emitClassDeclarationWithMethodInES6.ts, 11, 5))
static ["computedname5"](a: string) { }
>"computedname5" : Symbol(D[["computedname5"]], Decl(emitClassDeclarationWithMethodInES6.ts, 12, 34))
>"computedname5" : Symbol(D["computedname5"], Decl(emitClassDeclarationWithMethodInES6.ts, 12, 34))
>a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 13, 29))
static ["computedname6"](a: string): boolean { return true; }
>"computedname6" : Symbol(D[["computedname6"]], Decl(emitClassDeclarationWithMethodInES6.ts, 13, 43))
>"computedname6" : Symbol(D["computedname6"], Decl(emitClassDeclarationWithMethodInES6.ts, 13, 43))
>a : Symbol(a, Decl(emitClassDeclarationWithMethodInES6.ts, 14, 29))
static staticMethod() {
@@ -23,7 +23,7 @@ class C3 {
>C3 : C3
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
const x = yield 1;
>x : any
@@ -50,14 +50,14 @@ class C5 {
>C5 : C5
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
const x = yield* (async function*() { yield 1; })();
>x : any
>yield* (async function*() { yield 1; })() : any
>(async function*() { yield 1; })() : AsyncIterableIterator<1>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<1>
>async function*() { yield 1; } : () => AsyncIterableIterator<1>
>(async function*() { yield 1; })() : AsyncIterableIterator<number>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<number>
>async function*() { yield 1; } : () => AsyncIterableIterator<number>
>yield 1 : any
>1 : 1
}
@@ -80,7 +80,7 @@ class C7 {
>C7 : C7
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
return 1;
>1 : 1
@@ -23,7 +23,7 @@ class C3 {
>C3 : C3
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
const x = yield 1;
>x : any
@@ -50,14 +50,14 @@ class C5 {
>C5 : C5
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
const x = yield* (async function*() { yield 1; })();
>x : any
>yield* (async function*() { yield 1; })() : any
>(async function*() { yield 1; })() : AsyncIterableIterator<1>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<1>
>async function*() { yield 1; } : () => AsyncIterableIterator<1>
>(async function*() { yield 1; })() : AsyncIterableIterator<number>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<number>
>async function*() { yield 1; } : () => AsyncIterableIterator<number>
>yield 1 : any
>1 : 1
}
@@ -80,7 +80,7 @@ class C7 {
>C7 : C7
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
return 1;
>1 : 1
@@ -23,7 +23,7 @@ class C3 {
>C3 : C3
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
const x = yield 1;
>x : any
@@ -50,14 +50,14 @@ class C5 {
>C5 : C5
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
const x = yield* (async function*() { yield 1; })();
>x : any
>yield* (async function*() { yield 1; })() : any
>(async function*() { yield 1; })() : AsyncIterableIterator<1>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<1>
>async function*() { yield 1; } : () => AsyncIterableIterator<1>
>(async function*() { yield 1; })() : AsyncIterableIterator<number>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<number>
>async function*() { yield 1; } : () => AsyncIterableIterator<number>
>yield 1 : any
>1 : 1
}
@@ -80,7 +80,7 @@ class C7 {
>C7 : C7
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
return 1;
>1 : 1
@@ -12,7 +12,7 @@ async function * f2() {
}
=== tests/cases/conformance/emitter/es2015/asyncGenerators/F3.ts ===
async function * f3() {
>f3 : () => AsyncIterableIterator<1>
>f3 : () => AsyncIterableIterator<number>
const x = yield 1;
>x : any
@@ -31,14 +31,14 @@ async function * f4() {
}
=== tests/cases/conformance/emitter/es2015/asyncGenerators/F5.ts ===
async function * f5() {
>f5 : () => AsyncIterableIterator<1>
>f5 : () => AsyncIterableIterator<number>
const x = yield* (async function*() { yield 1; })();
>x : any
>yield* (async function*() { yield 1; })() : any
>(async function*() { yield 1; })() : AsyncIterableIterator<1>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<1>
>async function*() { yield 1; } : () => AsyncIterableIterator<1>
>(async function*() { yield 1; })() : AsyncIterableIterator<number>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<number>
>async function*() { yield 1; } : () => AsyncIterableIterator<number>
>yield 1 : any
>1 : 1
}
@@ -53,7 +53,7 @@ async function * f6() {
}
=== tests/cases/conformance/emitter/es2015/asyncGenerators/F7.ts ===
async function * f7() {
>f7 : () => AsyncIterableIterator<1>
>f7 : () => AsyncIterableIterator<number>
return 1;
>1 : 1
@@ -12,7 +12,7 @@ async function * f2() {
}
=== tests/cases/conformance/emitter/es5/asyncGenerators/F3.ts ===
async function * f3() {
>f3 : () => AsyncIterableIterator<1>
>f3 : () => AsyncIterableIterator<number>
const x = yield 1;
>x : any
@@ -31,14 +31,14 @@ async function * f4() {
}
=== tests/cases/conformance/emitter/es5/asyncGenerators/F5.ts ===
async function * f5() {
>f5 : () => AsyncIterableIterator<1>
>f5 : () => AsyncIterableIterator<number>
const x = yield* (async function*() { yield 1; })();
>x : any
>yield* (async function*() { yield 1; })() : any
>(async function*() { yield 1; })() : AsyncIterableIterator<1>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<1>
>async function*() { yield 1; } : () => AsyncIterableIterator<1>
>(async function*() { yield 1; })() : AsyncIterableIterator<number>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<number>
>async function*() { yield 1; } : () => AsyncIterableIterator<number>
>yield 1 : any
>1 : 1
}
@@ -53,7 +53,7 @@ async function * f6() {
}
=== tests/cases/conformance/emitter/es5/asyncGenerators/F7.ts ===
async function * f7() {
>f7 : () => AsyncIterableIterator<1>
>f7 : () => AsyncIterableIterator<number>
return 1;
>1 : 1
@@ -12,7 +12,7 @@ async function * f2() {
}
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F3.ts ===
async function * f3() {
>f3 : () => AsyncIterableIterator<1>
>f3 : () => AsyncIterableIterator<number>
const x = yield 1;
>x : any
@@ -31,14 +31,14 @@ async function * f4() {
}
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F5.ts ===
async function * f5() {
>f5 : () => AsyncIterableIterator<1>
>f5 : () => AsyncIterableIterator<number>
const x = yield* (async function*() { yield 1; })();
>x : any
>yield* (async function*() { yield 1; })() : any
>(async function*() { yield 1; })() : AsyncIterableIterator<1>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<1>
>async function*() { yield 1; } : () => AsyncIterableIterator<1>
>(async function*() { yield 1; })() : AsyncIterableIterator<number>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<number>
>async function*() { yield 1; } : () => AsyncIterableIterator<number>
>yield 1 : any
>1 : 1
}
@@ -53,7 +53,7 @@ async function * f6() {
}
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F7.ts ===
async function * f7() {
>f7 : () => AsyncIterableIterator<1>
>f7 : () => AsyncIterableIterator<number>
return 1;
>1 : 1
@@ -14,8 +14,8 @@ const f2 = async function * () {
}
=== tests/cases/conformance/emitter/es2015/asyncGenerators/F3.ts ===
const f3 = async function * () {
>f3 : () => AsyncIterableIterator<1>
>async function * () { const x = yield 1;} : () => AsyncIterableIterator<1>
>f3 : () => AsyncIterableIterator<number>
>async function * () { const x = yield 1;} : () => AsyncIterableIterator<number>
const x = yield 1;
>x : any
@@ -35,15 +35,15 @@ const f4 = async function * () {
}
=== tests/cases/conformance/emitter/es2015/asyncGenerators/F5.ts ===
const f5 = async function * () {
>f5 : () => AsyncIterableIterator<1>
>async function * () { const x = yield* (async function*() { yield 1; })();} : () => AsyncIterableIterator<1>
>f5 : () => AsyncIterableIterator<number>
>async function * () { const x = yield* (async function*() { yield 1; })();} : () => AsyncIterableIterator<number>
const x = yield* (async function*() { yield 1; })();
>x : any
>yield* (async function*() { yield 1; })() : any
>(async function*() { yield 1; })() : AsyncIterableIterator<1>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<1>
>async function*() { yield 1; } : () => AsyncIterableIterator<1>
>(async function*() { yield 1; })() : AsyncIterableIterator<number>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<number>
>async function*() { yield 1; } : () => AsyncIterableIterator<number>
>yield 1 : any
>1 : 1
}
@@ -59,8 +59,8 @@ const f6 = async function * () {
}
=== tests/cases/conformance/emitter/es2015/asyncGenerators/F7.ts ===
const f7 = async function * () {
>f7 : () => AsyncIterableIterator<1>
>async function * () { return 1;} : () => AsyncIterableIterator<1>
>f7 : () => AsyncIterableIterator<number>
>async function * () { return 1;} : () => AsyncIterableIterator<number>
return 1;
>1 : 1
@@ -14,8 +14,8 @@ const f2 = async function * () {
}
=== tests/cases/conformance/emitter/es5/asyncGenerators/F3.ts ===
const f3 = async function * () {
>f3 : () => AsyncIterableIterator<1>
>async function * () { const x = yield 1;} : () => AsyncIterableIterator<1>
>f3 : () => AsyncIterableIterator<number>
>async function * () { const x = yield 1;} : () => AsyncIterableIterator<number>
const x = yield 1;
>x : any
@@ -35,15 +35,15 @@ const f4 = async function * () {
}
=== tests/cases/conformance/emitter/es5/asyncGenerators/F5.ts ===
const f5 = async function * () {
>f5 : () => AsyncIterableIterator<1>
>async function * () { const x = yield* (async function*() { yield 1; })();} : () => AsyncIterableIterator<1>
>f5 : () => AsyncIterableIterator<number>
>async function * () { const x = yield* (async function*() { yield 1; })();} : () => AsyncIterableIterator<number>
const x = yield* (async function*() { yield 1; })();
>x : any
>yield* (async function*() { yield 1; })() : any
>(async function*() { yield 1; })() : AsyncIterableIterator<1>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<1>
>async function*() { yield 1; } : () => AsyncIterableIterator<1>
>(async function*() { yield 1; })() : AsyncIterableIterator<number>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<number>
>async function*() { yield 1; } : () => AsyncIterableIterator<number>
>yield 1 : any
>1 : 1
}
@@ -59,8 +59,8 @@ const f6 = async function * () {
}
=== tests/cases/conformance/emitter/es5/asyncGenerators/F7.ts ===
const f7 = async function * () {
>f7 : () => AsyncIterableIterator<1>
>async function * () { return 1;} : () => AsyncIterableIterator<1>
>f7 : () => AsyncIterableIterator<number>
>async function * () { return 1;} : () => AsyncIterableIterator<number>
return 1;
>1 : 1
@@ -14,8 +14,8 @@ const f2 = async function * () {
}
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F3.ts ===
const f3 = async function * () {
>f3 : () => AsyncIterableIterator<1>
>async function * () { const x = yield 1;} : () => AsyncIterableIterator<1>
>f3 : () => AsyncIterableIterator<number>
>async function * () { const x = yield 1;} : () => AsyncIterableIterator<number>
const x = yield 1;
>x : any
@@ -35,15 +35,15 @@ const f4 = async function * () {
}
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F5.ts ===
const f5 = async function * () {
>f5 : () => AsyncIterableIterator<1>
>async function * () { const x = yield* (async function*() { yield 1; })();} : () => AsyncIterableIterator<1>
>f5 : () => AsyncIterableIterator<number>
>async function * () { const x = yield* (async function*() { yield 1; })();} : () => AsyncIterableIterator<number>
const x = yield* (async function*() { yield 1; })();
>x : any
>yield* (async function*() { yield 1; })() : any
>(async function*() { yield 1; })() : AsyncIterableIterator<1>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<1>
>async function*() { yield 1; } : () => AsyncIterableIterator<1>
>(async function*() { yield 1; })() : AsyncIterableIterator<number>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<number>
>async function*() { yield 1; } : () => AsyncIterableIterator<number>
>yield 1 : any
>1 : 1
}
@@ -59,8 +59,8 @@ const f6 = async function * () {
}
=== tests/cases/conformance/emitter/esnext/asyncGenerators/F7.ts ===
const f7 = async function * () {
>f7 : () => AsyncIterableIterator<1>
>async function * () { return 1;} : () => AsyncIterableIterator<1>
>f7 : () => AsyncIterableIterator<number>
>async function * () { return 1;} : () => AsyncIterableIterator<number>
return 1;
>1 : 1
@@ -22,11 +22,11 @@ const o2 = {
}
=== tests/cases/conformance/emitter/es2015/asyncGenerators/O3.ts ===
const o3 = {
>o3 : { f(): AsyncIterableIterator<1>; }
>{ async * f() { const x = yield 1; }} : { f(): AsyncIterableIterator<1>; }
>o3 : { f(): AsyncIterableIterator<number>; }
>{ async * f() { const x = yield 1; }} : { f(): AsyncIterableIterator<number>; }
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
const x = yield 1;
>x : any
@@ -51,18 +51,18 @@ const o4 = {
}
=== tests/cases/conformance/emitter/es2015/asyncGenerators/O5.ts ===
const o5 = {
>o5 : { f(): AsyncIterableIterator<1>; }
>{ async * f() { const x = yield* (async function*() { yield 1; })(); }} : { f(): AsyncIterableIterator<1>; }
>o5 : { f(): AsyncIterableIterator<number>; }
>{ async * f() { const x = yield* (async function*() { yield 1; })(); }} : { f(): AsyncIterableIterator<number>; }
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
const x = yield* (async function*() { yield 1; })();
>x : any
>yield* (async function*() { yield 1; })() : any
>(async function*() { yield 1; })() : AsyncIterableIterator<1>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<1>
>async function*() { yield 1; } : () => AsyncIterableIterator<1>
>(async function*() { yield 1; })() : AsyncIterableIterator<number>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<number>
>async function*() { yield 1; } : () => AsyncIterableIterator<number>
>yield 1 : any
>1 : 1
}
@@ -83,11 +83,11 @@ const o6 = {
}
=== tests/cases/conformance/emitter/es2015/asyncGenerators/O7.ts ===
const o7 = {
>o7 : { f(): AsyncIterableIterator<1>; }
>{ async * f() { return 1; }} : { f(): AsyncIterableIterator<1>; }
>o7 : { f(): AsyncIterableIterator<number>; }
>{ async * f() { return 1; }} : { f(): AsyncIterableIterator<number>; }
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
return 1;
>1 : 1
@@ -22,11 +22,11 @@ const o2 = {
}
=== tests/cases/conformance/emitter/es5/asyncGenerators/O3.ts ===
const o3 = {
>o3 : { f(): AsyncIterableIterator<1>; }
>{ async * f() { const x = yield 1; }} : { f(): AsyncIterableIterator<1>; }
>o3 : { f(): AsyncIterableIterator<number>; }
>{ async * f() { const x = yield 1; }} : { f(): AsyncIterableIterator<number>; }
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
const x = yield 1;
>x : any
@@ -51,18 +51,18 @@ const o4 = {
}
=== tests/cases/conformance/emitter/es5/asyncGenerators/O5.ts ===
const o5 = {
>o5 : { f(): AsyncIterableIterator<1>; }
>{ async * f() { const x = yield* (async function*() { yield 1; })(); }} : { f(): AsyncIterableIterator<1>; }
>o5 : { f(): AsyncIterableIterator<number>; }
>{ async * f() { const x = yield* (async function*() { yield 1; })(); }} : { f(): AsyncIterableIterator<number>; }
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
const x = yield* (async function*() { yield 1; })();
>x : any
>yield* (async function*() { yield 1; })() : any
>(async function*() { yield 1; })() : AsyncIterableIterator<1>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<1>
>async function*() { yield 1; } : () => AsyncIterableIterator<1>
>(async function*() { yield 1; })() : AsyncIterableIterator<number>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<number>
>async function*() { yield 1; } : () => AsyncIterableIterator<number>
>yield 1 : any
>1 : 1
}
@@ -83,11 +83,11 @@ const o6 = {
}
=== tests/cases/conformance/emitter/es5/asyncGenerators/O7.ts ===
const o7 = {
>o7 : { f(): AsyncIterableIterator<1>; }
>{ async * f() { return 1; }} : { f(): AsyncIterableIterator<1>; }
>o7 : { f(): AsyncIterableIterator<number>; }
>{ async * f() { return 1; }} : { f(): AsyncIterableIterator<number>; }
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
return 1;
>1 : 1
@@ -22,11 +22,11 @@ const o2 = {
}
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O3.ts ===
const o3 = {
>o3 : { f(): AsyncIterableIterator<1>; }
>{ async * f() { const x = yield 1; }} : { f(): AsyncIterableIterator<1>; }
>o3 : { f(): AsyncIterableIterator<number>; }
>{ async * f() { const x = yield 1; }} : { f(): AsyncIterableIterator<number>; }
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
const x = yield 1;
>x : any
@@ -51,18 +51,18 @@ const o4 = {
}
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O5.ts ===
const o5 = {
>o5 : { f(): AsyncIterableIterator<1>; }
>{ async * f() { const x = yield* (async function*() { yield 1; })(); }} : { f(): AsyncIterableIterator<1>; }
>o5 : { f(): AsyncIterableIterator<number>; }
>{ async * f() { const x = yield* (async function*() { yield 1; })(); }} : { f(): AsyncIterableIterator<number>; }
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
const x = yield* (async function*() { yield 1; })();
>x : any
>yield* (async function*() { yield 1; })() : any
>(async function*() { yield 1; })() : AsyncIterableIterator<1>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<1>
>async function*() { yield 1; } : () => AsyncIterableIterator<1>
>(async function*() { yield 1; })() : AsyncIterableIterator<number>
>(async function*() { yield 1; }) : () => AsyncIterableIterator<number>
>async function*() { yield 1; } : () => AsyncIterableIterator<number>
>yield 1 : any
>1 : 1
}
@@ -83,11 +83,11 @@ const o6 = {
}
=== tests/cases/conformance/emitter/esnext/asyncGenerators/O7.ts ===
const o7 = {
>o7 : { f(): AsyncIterableIterator<1>; }
>{ async * f() { return 1; }} : { f(): AsyncIterableIterator<1>; }
>o7 : { f(): AsyncIterableIterator<number>; }
>{ async * f() { return 1; }} : { f(): AsyncIterableIterator<number>; }
async * f() {
>f : () => AsyncIterableIterator<1>
>f : () => AsyncIterableIterator<number>
return 1;
>1 : 1
@@ -3,7 +3,7 @@ class C {
>C : C
public * foo() {
>foo : () => IterableIterator<1>
>foo : () => IterableIterator<number>
yield 1
>yield 1 : any
@@ -1,7 +1,7 @@
=== tests/cases/compiler/generatorES6_3.ts ===
var v = function*() {
>v : () => IterableIterator<0>
>function*() { yield 0} : () => IterableIterator<0>
>v : () => IterableIterator<number>
>function*() { yield 0} : () => IterableIterator<number>
yield 0
>yield 0 : any
@@ -1,10 +1,10 @@
=== tests/cases/compiler/generatorES6_4.ts ===
var v = {
>v : { foo(): IterableIterator<0>; }
>{ *foo() { yield 0 }} : { foo(): IterableIterator<0>; }
>v : { foo(): IterableIterator<number>; }
>{ *foo() { yield 0 }} : { foo(): IterableIterator<number>; }
*foo() {
>foo : () => IterableIterator<0>
>foo : () => IterableIterator<number>
yield 0
>yield 0 : any
@@ -1,6 +1,6 @@
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck15.ts ===
function* g() {
>g : () => IterableIterator<"">
>g : () => IterableIterator<string>
return "";
>"" : ""
@@ -1,13 +1,13 @@
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck33.ts ===
function* g() {
>g : () => IterableIterator<0>
>g : () => IterableIterator<number>
yield 0;
>yield 0 : any
>0 : 0
function* g2() {
>g2 : () => IterableIterator<"">
>g2 : () => IterableIterator<string>
yield "";
>yield "" : any
@@ -1,13 +1,13 @@
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck34.ts ===
function* g() {
>g : () => IterableIterator<0>
>g : () => IterableIterator<number>
yield 0;
>yield 0 : any
>0 : 0
function* g2() {
>g2 : () => IterableIterator<"">
>g2 : () => IterableIterator<string>
return "";
>"" : ""
@@ -1,6 +1,6 @@
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck35.ts ===
function* g() {
>g : () => IterableIterator<0>
>g : () => IterableIterator<number>
yield 0;
>yield 0 : any
@@ -3,7 +3,7 @@ var yield;
>yield : any
function* g() {
>g : () => IterableIterator<0>
>g : () => IterableIterator<number>
yield 0;
>yield 0 : any
@@ -1,6 +1,6 @@
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck41.ts ===
function* g() {
>g : () => IterableIterator<0>
>g : () => IterableIterator<number>
let x = {
>x : { [x: number]: number; }
@@ -1,6 +1,6 @@
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck42.ts ===
function* g() {
>g : () => IterableIterator<0>
>g : () => IterableIterator<number>
let x = {
>x : { [x: number]: () => void; }
@@ -1,6 +1,6 @@
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck43.ts ===
function* g() {
>g : () => IterableIterator<0>
>g : () => IterableIterator<number>
let x = {
>x : { [x: number]: () => IterableIterator<any>; }
@@ -1,6 +1,6 @@
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck44.ts ===
function* g() {
>g : () => IterableIterator<0>
>g : () => IterableIterator<number>
let x = {
>x : { [x: number]: number; }
@@ -1,6 +1,6 @@
=== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck49.ts ===
function* g() {
>g : () => IterableIterator<0>
>g : () => IterableIterator<number>
yield 0;
>yield 0 : any
@@ -3,7 +3,7 @@ function* g() {
>g : () => IterableIterator<any>
function* h() {
>h : () => IterableIterator<0>
>h : () => IterableIterator<number>
yield 0;
>yield 0 : any
@@ -3,9 +3,9 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(24,61): err
Type 'State | 1' is not assignable to type 'StrategicState'.
Type '1' has no properties in common with type 'StrategicState'.
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(29,70): error TS7025: Generator implicitly has type 'IterableIterator<any>' because it does not yield any values. Consider supplying a return type.
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(32,62): error TS2345: Argument of type '(state: State) => IterableIterator<1>' is not assignable to parameter of type '(a: State) => IterableIterator<State>'.
Type 'IterableIterator<1>' is not assignable to type 'IterableIterator<State>'.
Type '1' is not assignable to type 'State'.
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(32,62): error TS2345: Argument of type '(state: State) => IterableIterator<number>' is not assignable to parameter of type '(a: State) => IterableIterator<State>'.
Type 'IterableIterator<number>' is not assignable to type 'IterableIterator<State>'.
Type 'number' is not assignable to type 'State'.
tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(36,62): error TS2345: Argument of type '(state: State) => IterableIterator<State | 1>' is not assignable to parameter of type '(a: StrategicState) => IterableIterator<StrategicState>'.
Type 'IterableIterator<State | 1>' is not assignable to type 'IterableIterator<StrategicState>'.
@@ -51,9 +51,9 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck63.ts(36,62): err
export const Nothing2: Strategy<State> = strategy("Nothing", function* (state: State) {
~~~~~~~~
!!! error TS2345: Argument of type '(state: State) => IterableIterator<1>' is not assignable to parameter of type '(a: State) => IterableIterator<State>'.
!!! error TS2345: Type 'IterableIterator<1>' is not assignable to type 'IterableIterator<State>'.
!!! error TS2345: Type '1' is not assignable to type 'State'.
!!! error TS2345: Argument of type '(state: State) => IterableIterator<number>' is not assignable to parameter of type '(a: State) => IterableIterator<State>'.
!!! error TS2345: Type 'IterableIterator<number>' is not assignable to type 'IterableIterator<State>'.
!!! error TS2345: Type 'number' is not assignable to type 'State'.
return 1;
});
@@ -107,7 +107,7 @@ export const Nothing2: Strategy<State> = strategy("Nothing", function* (state: S
>strategy("Nothing", function* (state: State) { return 1;}) : any
>strategy : <T extends StrategicState>(stratName: string, gen: (a: T) => IterableIterator<T>) => (a: T) => IterableIterator<T>
>"Nothing" : "Nothing"
>function* (state: State) { return 1;} : (state: State) => IterableIterator<1>
>function* (state: State) { return 1;} : (state: State) => IterableIterator<number>
>state : State
>State : State
@@ -1,7 +1,7 @@
tests/cases/compiler/gettersAndSettersErrors.ts(2,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/gettersAndSettersErrors.ts(3,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/gettersAndSettersErrors.ts(5,12): error TS2300: Duplicate identifier 'Foo'.
tests/cases/compiler/gettersAndSettersErrors.ts(5,12): error TS2403: Subsequent variable declarations must have the same type. Variable 'Foo' has type 'string' at tests/cases/compiler/gettersAndSettersErrors.ts 1:15, but here has type 'number'.
tests/cases/compiler/gettersAndSettersErrors.ts(5,12): error TS2717: Subsequent property declarations must have the same type. Property 'Foo' has type 'string' at tests/cases/compiler/gettersAndSettersErrors.ts 1:15, but here has type 'number'.
tests/cases/compiler/gettersAndSettersErrors.ts(6,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/gettersAndSettersErrors.ts(7,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/gettersAndSettersErrors.ts(11,17): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
@@ -23,7 +23,7 @@ tests/cases/compiler/gettersAndSettersErrors.ts(12,16): error TS2379: Getter and
~~~
!!! error TS2300: Duplicate identifier 'Foo'.
~~~
!!! error TS2403: Subsequent variable declarations must have the same type. Variable 'Foo' has type 'string' at tests/cases/compiler/gettersAndSettersErrors.ts 1:15, but here has type 'number'.
!!! error TS2717: Subsequent property declarations must have the same type. Property 'Foo' has type 'string' at tests/cases/compiler/gettersAndSettersErrors.ts 1:15, but here has type 'number'.
public get Goo(v:string):string {return null;} // error - getters must not have a parameter
~~~
!!! error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
+16 -16
View File
@@ -16,7 +16,7 @@ tests/cases/compiler/giant.ts(33,16): error TS2300: Duplicate identifier 'tsF'.
tests/cases/compiler/giant.ts(34,12): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(35,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/giant.ts(35,16): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(60,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(60,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/giant.ts(60,6): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(61,5): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(62,6): error TS1096: An index signature must have exactly one parameter.
@@ -39,7 +39,7 @@ tests/cases/compiler/giant.ts(97,20): error TS2300: Duplicate identifier 'tsF'.
tests/cases/compiler/giant.ts(98,16): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(99,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/giant.ts(99,20): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(124,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(124,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/giant.ts(124,10): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(125,9): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(126,10): error TS1096: An index signature must have exactly one parameter.
@@ -63,7 +63,7 @@ tests/cases/compiler/giant.ts(176,20): error TS2300: Duplicate identifier 'tsF'.
tests/cases/compiler/giant.ts(177,16): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(178,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/giant.ts(178,20): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(203,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(203,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/giant.ts(203,10): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(204,9): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(205,10): error TS1096: An index signature must have exactly one parameter.
@@ -119,7 +119,7 @@ tests/cases/compiler/giant.ts(291,16): error TS2300: Duplicate identifier 'tsF'.
tests/cases/compiler/giant.ts(292,12): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(293,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/giant.ts(293,16): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(318,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(318,5): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/giant.ts(318,6): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(319,5): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(320,6): error TS1096: An index signature must have exactly one parameter.
@@ -142,7 +142,7 @@ tests/cases/compiler/giant.ts(355,20): error TS2300: Duplicate identifier 'tsF'.
tests/cases/compiler/giant.ts(356,16): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(357,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/giant.ts(357,20): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(382,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(382,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/giant.ts(382,10): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(383,9): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(384,10): error TS1096: An index signature must have exactly one parameter.
@@ -166,7 +166,7 @@ tests/cases/compiler/giant.ts(434,20): error TS2300: Duplicate identifier 'tsF'.
tests/cases/compiler/giant.ts(435,16): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(436,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/giant.ts(436,20): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(461,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(461,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/giant.ts(461,10): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(462,9): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(463,10): error TS1096: An index signature must have exactly one parameter.
@@ -238,7 +238,7 @@ tests/cases/compiler/giant.ts(555,21): error TS1036: Statements are not allowed
tests/cases/compiler/giant.ts(557,24): error TS1183: An implementation cannot be declared in ambient contexts.
tests/cases/compiler/giant.ts(560,21): error TS1183: An implementation cannot be declared in ambient contexts.
tests/cases/compiler/giant.ts(562,21): error TS1183: An implementation cannot be declared in ambient contexts.
tests/cases/compiler/giant.ts(586,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(586,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/giant.ts(586,10): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(587,9): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(588,10): error TS1096: An index signature must have exactly one parameter.
@@ -255,7 +255,7 @@ tests/cases/compiler/giant.ts(620,26): error TS1183: An implementation cannot be
tests/cases/compiler/giant.ts(622,24): error TS1183: An implementation cannot be declared in ambient contexts.
tests/cases/compiler/giant.ts(625,21): error TS1183: An implementation cannot be declared in ambient contexts.
tests/cases/compiler/giant.ts(627,21): error TS1183: An implementation cannot be declared in ambient contexts.
tests/cases/compiler/giant.ts(652,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(652,9): error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
tests/cases/compiler/giant.ts(652,10): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(653,9): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(654,10): error TS1096: An index signature must have exactly one parameter.
@@ -363,7 +363,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be
//Index Signature
[p];
~~~
!!! error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -473,7 +473,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be
//Index Signature
[p];
~~~
!!! error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -600,7 +600,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be
//Index Signature
[p];
~~~
!!! error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -827,7 +827,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be
//Index Signature
[p];
~~~
!!! error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -937,7 +937,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be
//Index Signature
[p];
~~~
!!! error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -1064,7 +1064,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be
//Index Signature
[p];
~~~
!!! error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -1333,7 +1333,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be
//Index Signature
[p];
~~~
!!! error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -1433,7 +1433,7 @@ tests/cases/compiler/giant.ts(675,30): error TS1183: An implementation cannot be
//Index Signature
[p];
~~~
!!! error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
!!! error TS1169: A computed property name in an interface must refer to an expression whose type is a literal type or a 'unique symbol' type.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];

Some files were not shown because too many files have changed in this diff Show More