Change Symbol to symbol in error messages

This commit is contained in:
Jason Freeman
2015-02-06 21:32:16 -08:00
parent 59a704e7c1
commit d793658b7f
67 changed files with 254 additions and 254 deletions
+10 -10
View File
@@ -5535,7 +5535,7 @@ module ts {
// This will allow types number, string, Symbol or any. It will also allow enums, the unknown
// type, and any union of these types (like string | number).
if (!isTypeOfKind(links.resolvedType, TypeFlags.Any | TypeFlags.NumberLike | TypeFlags.StringLike | TypeFlags.ESSymbol)) {
error(node, Diagnostics.A_computed_property_name_must_be_of_type_string_number_Symbol_or_any);
error(node, Diagnostics.A_computed_property_name_must_be_of_type_string_number_symbol_or_any);
}
}
@@ -10526,12 +10526,12 @@ module ts {
if (parameter.type.kind !== SyntaxKind.StringKeyword && parameter.type.kind !== SyntaxKind.NumberKeyword) {
if (parameter.type.kind === SyntaxKind.SymbolKeyword) {
if (languageVersion < ScriptTarget.ES6) {
return grammarErrorOnNode(parameter.type, Diagnostics.Symbol_indexers_are_only_available_when_targeting_ECMAScript_6_and_higher);
return grammarErrorOnNode(parameter.type, Diagnostics.symbol_indexers_are_only_available_when_targeting_ECMAScript_6_and_higher);
}
// No error for parameter type
}
else {
return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_parameter_type_must_be_string_number_or_Symbol);
return grammarErrorOnNode(parameter.name, Diagnostics.An_index_signature_parameter_type_must_be_string_number_or_symbol);
}
}
if (!node.type) {
@@ -10839,17 +10839,17 @@ module ts {
// and accessors are not allowed in ambient contexts in general,
// so this error only really matters for methods.
if (isInAmbientContext(node)) {
return checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_Symbol);
return checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol);
}
else if (!node.body) {
return checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_Symbol);
return checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol);
}
}
else if (node.parent.kind === SyntaxKind.InterfaceDeclaration) {
return checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_Symbol);
return checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol);
}
else if (node.parent.kind === SyntaxKind.TypeLiteral) {
return checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_Symbol);
return checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol);
}
}
@@ -11120,17 +11120,17 @@ module ts {
function checkGrammarProperty(node: PropertyDeclaration) {
if (node.parent.kind === SyntaxKind.ClassDeclaration) {
if (checkGrammarForInvalidQuestionMark(node, node.questionToken, Diagnostics.A_class_member_cannot_be_declared_optional) ||
checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_Symbol)) {
checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol)) {
return true;
}
}
else if (node.parent.kind === SyntaxKind.InterfaceDeclaration) {
if (checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_Symbol)) {
if (checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol)) {
return true;
}
}
else if (node.parent.kind === SyntaxKind.TypeLiteral) {
if (checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_Symbol)) {
if (checkGrammarForNonSymbolComputedProperty(node.name, Diagnostics.A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol)) {
return true;
}
}
@@ -19,7 +19,7 @@ module ts {
An_index_signature_parameter_cannot_have_an_initializer: { code: 1020, category: DiagnosticCategory.Error, key: "An index signature parameter cannot have an initializer." },
An_index_signature_must_have_a_type_annotation: { code: 1021, category: DiagnosticCategory.Error, key: "An index signature must have a type annotation." },
An_index_signature_parameter_must_have_a_type_annotation: { code: 1022, category: DiagnosticCategory.Error, key: "An index signature parameter must have a type annotation." },
An_index_signature_parameter_type_must_be_string_number_or_Symbol: { code: 1023, category: DiagnosticCategory.Error, key: "An index signature parameter type must be 'string', 'number', or 'Symbol'." },
An_index_signature_parameter_type_must_be_string_number_or_symbol: { code: 1023, category: DiagnosticCategory.Error, key: "An index signature parameter type must be 'string', 'number', or 'symbol'." },
A_class_or_interface_declaration_can_only_have_one_extends_clause: { code: 1024, category: DiagnosticCategory.Error, key: "A class or interface declaration can only have one 'extends' clause." },
An_extends_clause_must_precede_an_implements_clause: { code: 1025, category: DiagnosticCategory.Error, key: "An 'extends' clause must precede an 'implements' clause." },
A_class_can_only_extend_a_single_class: { code: 1026, category: DiagnosticCategory.Error, key: "A class can only extend a single class." },
@@ -123,12 +123,12 @@ module ts {
An_object_member_cannot_be_declared_optional: { code: 1162, category: DiagnosticCategory.Error, key: "An object member cannot be declared optional." },
yield_expression_must_be_contained_within_a_generator_declaration: { code: 1163, category: DiagnosticCategory.Error, key: "'yield' expression must be contained_within a generator declaration." },
Computed_property_names_are_not_allowed_in_enums: { code: 1164, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in enums." },
A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_Symbol: { code: 1165, category: DiagnosticCategory.Error, key: "A computed property name in an ambient context must directly refer to a built-in Symbol." },
A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_Symbol: { code: 1166, category: DiagnosticCategory.Error, key: "A computed property name in a class property declaration must directly refer to a built-in Symbol." },
A_computed_property_name_in_an_ambient_context_must_directly_refer_to_a_built_in_symbol: { code: 1165, category: DiagnosticCategory.Error, key: "A computed property name in an ambient context must directly refer to a built-in symbol." },
A_computed_property_name_in_a_class_property_declaration_must_directly_refer_to_a_built_in_symbol: { code: 1166, category: DiagnosticCategory.Error, key: "A computed property name in a class property declaration must directly refer to a built-in symbol." },
Computed_property_names_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1167, category: DiagnosticCategory.Error, key: "Computed property names are only available when targeting ECMAScript 6 and higher." },
A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_Symbol: { code: 1168, category: DiagnosticCategory.Error, key: "A computed property name in a method overload must directly refer to a built-in Symbol." },
A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_Symbol: { code: 1169, category: DiagnosticCategory.Error, key: "A computed property name in an interface must directly refer to a built-in Symbol." },
A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_Symbol: { code: 1170, category: DiagnosticCategory.Error, key: "A computed property name in a type literal must directly refer to a built-in Symbol." },
A_computed_property_name_in_a_method_overload_must_directly_refer_to_a_built_in_symbol: { code: 1168, category: DiagnosticCategory.Error, key: "A computed property name in a method overload must directly refer to a built-in symbol." },
A_computed_property_name_in_an_interface_must_directly_refer_to_a_built_in_symbol: { code: 1169, category: DiagnosticCategory.Error, key: "A computed property name in an interface must directly refer to a built-in symbol." },
A_computed_property_name_in_a_type_literal_must_directly_refer_to_a_built_in_symbol: { code: 1170, category: DiagnosticCategory.Error, key: "A computed property name in a type literal must directly refer to a built-in symbol." },
A_comma_expression_is_not_allowed_in_a_computed_property_name: { code: 1171, category: DiagnosticCategory.Error, key: "A comma expression is not allowed in a computed property name." },
extends_clause_already_seen: { code: 1172, category: DiagnosticCategory.Error, key: "'extends' clause already seen." },
extends_clause_must_precede_implements_clause: { code: 1173, category: DiagnosticCategory.Error, key: "'extends' clause must precede 'implements' clause." },
@@ -147,7 +147,7 @@ module ts {
Merge_conflict_marker_encountered: { code: 1185, category: DiagnosticCategory.Error, key: "Merge conflict marker encountered." },
A_rest_element_cannot_have_an_initializer: { code: 1186, category: DiagnosticCategory.Error, key: "A rest element cannot have an initializer." },
A_parameter_property_may_not_be_a_binding_pattern: { code: 1187, category: DiagnosticCategory.Error, key: "A parameter property may not be a binding pattern." },
Symbol_indexers_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1188, category: DiagnosticCategory.Error, key: "'Symbol' indexers are only available when targeting ECMAScript 6 and higher.", isEarly: true },
symbol_indexers_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1188, category: DiagnosticCategory.Error, key: "'symbol' indexers are only available when targeting ECMAScript 6 and higher.", isEarly: true },
Duplicate_identifier_0: { code: 2300, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'." },
Initializer_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: { code: 2301, category: DiagnosticCategory.Error, key: "Initializer of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor." },
Static_members_cannot_reference_class_type_parameters: { code: 2302, category: DiagnosticCategory.Error, key: "Static members cannot reference class type parameters." },
@@ -300,10 +300,10 @@ module ts {
Type_0_is_not_an_array_type: { code: 2461, category: DiagnosticCategory.Error, key: "Type '{0}' is not an array type." },
A_rest_element_must_be_last_in_an_array_destructuring_pattern: { code: 2462, category: DiagnosticCategory.Error, key: "A rest element must be last in an array destructuring pattern" },
A_binding_pattern_parameter_cannot_be_optional_in_an_implementation_signature: { code: 2463, category: DiagnosticCategory.Error, key: "A binding pattern parameter cannot be optional in an implementation signature." },
A_computed_property_name_must_be_of_type_string_number_Symbol_or_any: { code: 2464, category: DiagnosticCategory.Error, key: "A computed property name must be of type 'string', 'number', 'Symbol', or 'any'." },
A_computed_property_name_must_be_of_type_string_number_symbol_or_any: { code: 2464, category: DiagnosticCategory.Error, key: "A computed property name must be of type 'string', 'number', 'symbol', or 'any'." },
this_cannot_be_referenced_in_a_computed_property_name: { code: 2465, category: DiagnosticCategory.Error, key: "'this' cannot be referenced in a computed property name." },
super_cannot_be_referenced_in_a_computed_property_name: { code: 2466, category: DiagnosticCategory.Error, key: "'super' cannot be referenced in a computed property name." },
A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: { code: 2466, category: DiagnosticCategory.Error, key: "A computed property name cannot reference a type parameter from its containing type." },
A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type: { code: 2467, category: DiagnosticCategory.Error, key: "A computed property name cannot reference a type parameter from its containing type." },
Cannot_find_global_value_0: { code: 2468, category: DiagnosticCategory.Error, key: "Cannot find global value '{0}'." },
Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." },
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: { code: 4002, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported class has or is using private name '{1}'." },
+9 -9
View File
@@ -67,7 +67,7 @@
"category": "Error",
"code": 1022
},
"An index signature parameter type must be 'string', 'number', or 'Symbol'.": {
"An index signature parameter type must be 'string', 'number', or 'symbol'.": {
"category": "Error",
"code": 1023
},
@@ -483,11 +483,11 @@
"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 directly refer to a built-in symbol.": {
"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 directly refer to a built-in symbol.": {
"category": "Error",
"code": 1166
},
@@ -495,15 +495,15 @@
"category": "Error",
"code": 1167
},
"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 directly refer to a built-in symbol.": {
"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 directly refer to a built-in symbol.": {
"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 directly refer to a built-in symbol.": {
"category": "Error",
"code": 1170
},
@@ -579,7 +579,7 @@
"category": "Error",
"code": 1187
},
"'Symbol' indexers are only available when targeting ECMAScript 6 and higher.": {
"'symbol' indexers are only available when targeting ECMAScript 6 and higher.": {
"category": "Error",
"code": 1188,
"isEarly": true
@@ -1193,7 +1193,7 @@
"category": "Error",
"code": 2463
},
"A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.": {
"A computed property name must be of type 'string', 'number', 'symbol', or 'any'.": {
"category": "Error",
"code": 2464
},
@@ -1207,7 +1207,7 @@
},
"A computed property name cannot reference a type parameter from its containing type.": {
"category": "Error",
"code": 2466
"code": 2467
},
"Cannot find global value '{0}'.": {
"category": "Error",
@@ -1,4 +1,4 @@
tests/cases/compiler/arraySigChecking.ts(11,17): error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
tests/cases/compiler/arraySigChecking.ts(11,17): error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
tests/cases/compiler/arraySigChecking.ts(18,5): error TS2322: Type 'void[]' is not assignable to type 'string[]'.
Type 'void' is not assignable to type 'string'.
tests/cases/compiler/arraySigChecking.ts(22,1): error TS2322: Type 'number[][]' is not assignable to type 'number[][][]'.
@@ -20,7 +20,7 @@ tests/cases/compiler/arraySigChecking.ts(22,1): error TS2322: Type 'number[][]'
var foo: { [index: any]; }; // expect an error here
~~~~~
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
}
interface myInt {
@@ -1,14 +1,14 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames12.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.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.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.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.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.ts(10,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.ts(11,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.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.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.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.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.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.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.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.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.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.ts(10,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.ts(11,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.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.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.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.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.ts (11 errors) ====
@@ -18,35 +18,35 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames12.ts(15,12)
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 directly refer to a built-in symbol.
[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 directly refer to a built-in symbol.
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 directly refer to a built-in symbol.
[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 directly refer to a built-in symbol.
[+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 directly refer to a built-in symbol.
static [""]: 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 directly refer to a built-in symbol.
[0]: 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 directly refer to a built-in symbol.
[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 directly refer to a built-in symbol.
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 directly refer to a built-in symbol.
[`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 directly refer to a built-in symbol.
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 directly refer to a built-in symbol.
}
@@ -1,9 +1,9 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(6,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(8,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts (6 errors) ====
@@ -11,20 +11,20 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames14.ts(8,12):
class C {
[b]() {}
~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
static [true]() { }
~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
[[]]() { }
~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
static [{}]() { }
~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
[undefined]() { }
~~~~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
static [null]() { }
~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
}
@@ -1,5 +1,5 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames15.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames15.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames15.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames15.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames15.ts (2 errors) ====
@@ -10,8 +10,8 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames15.ts(7,5):
[p1]() { }
[p2]() { }
~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
[p3]() { }
~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
}
@@ -1,9 +1,9 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts(3,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts(4,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts(8,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts (6 errors) ====
@@ -11,20 +11,20 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames17.ts(8,9):
class C {
get [b]() { return 0;}
~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
static set [true](v) { }
~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
get [[]]() { return 0; }
~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
set [{}](v) { }
~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
static get [undefined]() { return 0; }
~~~~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
set [null](v) { }
~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
}
@@ -1,9 +1,9 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(4,12): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(5,9): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(7,16): error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts (6 errors) ====
@@ -12,19 +12,19 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3.ts(7,16):
[0 + 1]() { }
static [() => { }]() { }
~~~~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
get [delete id]() { }
~~~~~~~~~~~
!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
~~~~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
set [[0, 1]](v) { }
~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
static get [<String>""]() { }
~~~~~~~~~~~~
!!! error TS2378: A 'get' accessor must return a value or consist of a single 'throw' statement.
~~~~~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
static set [id.toString()](v) { }
}
@@ -1,4 +1,4 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames32.ts(6,10): error TS2466: A computed property name cannot reference a type parameter from its containing type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames32.ts(6,10): error TS2467: A computed property name cannot reference a type parameter from its containing type.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames32.ts (1 errors) ====
@@ -9,5 +9,5 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames32.ts(6,10):
}
[foo<T>()]() { }
~
!!! error TS2466: A computed property name cannot reference a type parameter from its containing type.
!!! error TS2467: A computed property name cannot reference a type parameter from its containing type.
}
@@ -1,5 +1,5 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames35.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.ts(4,10): error TS2466: A computed property name cannot reference a type parameter from its containing type.
tests/cases/conformance/es6/computedProperties/computedPropertyNames35.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.ts(4,10): error TS2467: A computed property name cannot reference a type parameter from its containing type.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames35.ts (2 errors) ====
@@ -8,7 +8,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames35.ts(4,10):
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 directly refer to a built-in symbol.
~
!!! error TS2466: A computed property name cannot reference a type parameter from its containing 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/computedPropertyNames42.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/computedPropertyNames42.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/computedPropertyNames42.ts(8,5): error TS2411: Property '[""]' of type 'Foo' is not assignable to string index type 'Foo2'.
@@ -12,7 +12,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames42.ts(8,5):
// Computed properties
[""]: Foo;
~~~~
!!! 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 directly refer to a built-in symbol.
~~~~~~~~~~
!!! error TS2411: Property '[""]' of type 'Foo' is not assignable to string index type 'Foo2'.
}
@@ -1,9 +1,9 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts(5,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts(8,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts (6 errors) ====
@@ -11,20 +11,20 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames5.ts(8,5): e
var v = {
[b]: 0,
~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
[true]: 1,
~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
[[]]: 0,
~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
[{}]: 0,
~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
[undefined]: undefined,
~~~~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
[null]: null
~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
}
@@ -1,5 +1,5 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames6.ts(6,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames6.ts(7,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames6.ts (2 errors) ====
@@ -10,8 +10,8 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames6.ts(7,5): e
[p1]: 0,
[p2]: 1,
~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
[p3]: 2
~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
}
@@ -1,5 +1,5 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames8.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames8.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames8.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames8.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames8.ts (2 errors) ====
@@ -9,9 +9,9 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames8.ts(6,9): e
var v = {
[t]: 0,
~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
[u]: 1
~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
};
}
@@ -1,4 +1,4 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNames9.ts(9,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/computedProperties/computedPropertyNames9.ts(9,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
==== tests/cases/conformance/es6/computedProperties/computedPropertyNames9.ts (1 errors) ====
@@ -12,5 +12,5 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames9.ts(9,5): e
[f(0)]: 0,
[f(true)]: 0
~~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
}
@@ -1,9 +1,9 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit3.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.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.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 directly refer to a built-in symbol.
}
@@ -1,9 +1,9 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNamesDeclarationEmit4.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.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.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 directly refer to a built-in symbol.
}
@@ -1,5 +1,5 @@
tests/cases/conformance/es6/computedProperties/computedPropertyNamesOnOverloads.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.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.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.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.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 directly refer to a built-in symbol.
[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 directly refer to a built-in symbol.
[methodName](v?: string) { }
}
@@ -2,7 +2,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(10,21): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(11,22): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(11,26): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(12,19): error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(12,19): error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(12,22): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(12,26): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.d.ts(14,23): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
@@ -36,7 +36,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
declare var d: { [x: C]: C };
~
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
~
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
~
@@ -2,7 +2,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(10,13): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(11,14): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(11,18): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(12,11): error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(12,11): error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(12,14): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(12,18): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument.ts(14,13): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
@@ -46,7 +46,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
var d: { [x: C]: C };
~
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
~
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
~
@@ -2,7 +2,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(10,13): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(11,14): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(11,18): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(12,11): error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(12,11): error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(12,14): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(12,18): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument2.ts(14,13): error TS2314: Generic type 'I<T>' requires 1 type argument(s).
@@ -46,7 +46,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
!!! error TS2314: Generic type 'I<T>' requires 1 type argument(s).
var d: { [x: I]: I };
~
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
~
!!! error TS2314: Generic type 'I<T>' requires 1 type argument(s).
~
@@ -2,7 +2,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(10,21): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(11,22): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(11,26): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(12,19): error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(12,19): error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(12,22): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(12,26): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenceWithoutTypeArgument3.ts(14,23): error TS2314: Generic type 'C<T>' requires 1 type argument(s).
@@ -36,7 +36,7 @@ tests/cases/conformance/types/specifyingTypes/typeReferences/genericTypeReferenc
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
declare var d: { [x: C]: C };
~
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
~
!!! error TS2314: Generic type 'C<T>' requires 1 type argument(s).
~
+16 -16
View File
@@ -16,7 +16,7 @@ tests/cases/compiler/giant.ts(34,16): error TS2300: Duplicate identifier 'tsF'.
tests/cases/compiler/giant.ts(35,12): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(36,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/giant.ts(36,16): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(61,5): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/compiler/giant.ts(61,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(61,6): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(62,5): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(63,6): error TS1096: An index signature must have exactly one parameter.
@@ -39,7 +39,7 @@ tests/cases/compiler/giant.ts(98,20): error TS2300: Duplicate identifier 'tsF'.
tests/cases/compiler/giant.ts(99,16): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(100,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/giant.ts(100,20): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(125,9): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/compiler/giant.ts(125,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(125,10): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(126,9): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(127,10): error TS1096: An index signature must have exactly one parameter.
@@ -63,7 +63,7 @@ tests/cases/compiler/giant.ts(177,20): error TS2300: Duplicate identifier 'tsF'.
tests/cases/compiler/giant.ts(178,16): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(179,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/giant.ts(179,20): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(204,9): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/compiler/giant.ts(204,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(204,10): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(205,9): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(206,10): error TS1096: An index signature must have exactly one parameter.
@@ -119,7 +119,7 @@ tests/cases/compiler/giant.ts(292,16): error TS2300: Duplicate identifier 'tsF'.
tests/cases/compiler/giant.ts(293,12): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(294,16): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/giant.ts(294,16): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(319,5): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/compiler/giant.ts(319,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(319,6): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(320,5): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(321,6): error TS1096: An index signature must have exactly one parameter.
@@ -142,7 +142,7 @@ tests/cases/compiler/giant.ts(356,20): error TS2300: Duplicate identifier 'tsF'.
tests/cases/compiler/giant.ts(357,16): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(358,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/giant.ts(358,20): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(383,9): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/compiler/giant.ts(383,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(383,10): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(384,9): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(385,10): error TS1096: An index signature must have exactly one parameter.
@@ -166,7 +166,7 @@ tests/cases/compiler/giant.ts(435,20): error TS2300: Duplicate identifier 'tsF'.
tests/cases/compiler/giant.ts(436,16): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(437,20): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
tests/cases/compiler/giant.ts(437,20): error TS2300: Duplicate identifier 'tgF'.
tests/cases/compiler/giant.ts(462,9): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/compiler/giant.ts(462,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(462,10): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(463,9): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(464,10): error TS1096: An index signature must have exactly one parameter.
@@ -238,7 +238,7 @@ tests/cases/compiler/giant.ts(556,21): error TS1036: Statements are not allowed
tests/cases/compiler/giant.ts(558,24): error TS1184: An implementation cannot be declared in ambient contexts.
tests/cases/compiler/giant.ts(561,21): error TS1184: An implementation cannot be declared in ambient contexts.
tests/cases/compiler/giant.ts(563,21): error TS1184: An implementation cannot be declared in ambient contexts.
tests/cases/compiler/giant.ts(587,9): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/compiler/giant.ts(587,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(587,10): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(588,9): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(589,10): error TS1096: An index signature must have exactly one parameter.
@@ -255,7 +255,7 @@ tests/cases/compiler/giant.ts(621,26): error TS1184: An implementation cannot be
tests/cases/compiler/giant.ts(623,24): error TS1184: An implementation cannot be declared in ambient contexts.
tests/cases/compiler/giant.ts(626,21): error TS1184: An implementation cannot be declared in ambient contexts.
tests/cases/compiler/giant.ts(628,21): error TS1184: An implementation cannot be declared in ambient contexts.
tests/cases/compiler/giant.ts(653,9): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/compiler/giant.ts(653,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/giant.ts(653,10): error TS2304: Cannot find name 'p'.
tests/cases/compiler/giant.ts(654,9): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/giant.ts(655,10): error TS1096: An index signature must have exactly one parameter.
@@ -364,7 +364,7 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -474,7 +474,7 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -601,7 +601,7 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -828,7 +828,7 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -938,7 +938,7 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -1065,7 +1065,7 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -1334,7 +1334,7 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -1434,7 +1434,7 @@ tests/cases/compiler/giant.ts(676,30): error TS1184: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -1,7 +1,7 @@
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(3,5): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(3,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(3,6): error TS2304: Cannot find name 'x'.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(4,5): error TS1021: An index signature must have a type annotation.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(9,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(9,6): error TS2304: Cannot find name 'x'.
tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021: An index signature must have a type annotation.
@@ -11,7 +11,7 @@ tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021
// Used to be indexer, now it is a computed property
[x]: string;
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'x'.
[x: string];
@@ -23,7 +23,7 @@ tests/cases/compiler/indexSignatureMustHaveTypeAnnotation.ts(14,5): error TS1021
// Used to be indexer, now it is a computed property
[x]: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'x'.
@@ -1,6 +1,6 @@
tests/cases/compiler/indexSignatureWithInitializer.ts(3,5): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/compiler/indexSignatureWithInitializer.ts(3,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/compiler/indexSignatureWithInitializer.ts(3,6): error TS2304: Cannot find name 'x'.
tests/cases/compiler/indexSignatureWithInitializer.ts(7,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/compiler/indexSignatureWithInitializer.ts(7,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/indexSignatureWithInitializer.ts(7,6): error TS2304: Cannot find name 'x'.
@@ -9,7 +9,7 @@ tests/cases/compiler/indexSignatureWithInitializer.ts(7,6): error TS2304: Cannot
interface I {
[x = '']: string;
~~~~~~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'x'.
}
@@ -17,7 +17,7 @@ tests/cases/compiler/indexSignatureWithInitializer.ts(7,6): error TS2304: Cannot
class C {
[x = 0]: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'x'.
}
@@ -4,7 +4,7 @@ tests/cases/compiler/indexTypeCheck.ts(17,2): error TS2413: Numeric index type '
tests/cases/compiler/indexTypeCheck.ts(22,2): error TS2413: Numeric index type 'Orange' is not assignable to string index type 'Yellow'.
tests/cases/compiler/indexTypeCheck.ts(27,2): error TS2413: Numeric index type 'number' is not assignable to string index type 'string'.
tests/cases/compiler/indexTypeCheck.ts(32,3): error TS1096: An index signature must have exactly one parameter.
tests/cases/compiler/indexTypeCheck.ts(36,3): error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
tests/cases/compiler/indexTypeCheck.ts(36,3): error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
tests/cases/compiler/indexTypeCheck.ts(51,1): error TS2342: An index expression argument must be of type 'string', 'number', or 'any'.
@@ -58,7 +58,7 @@ tests/cases/compiler/indexTypeCheck.ts(51,1): error TS2342: An index expression
interface Magenta {
[p:Purple]; // error
~
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
}
var yellow: Yellow;
@@ -1,4 +1,4 @@
tests/cases/compiler/indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/compiler/indexWithoutParamType2.ts(3,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/compiler/indexWithoutParamType2.ts(3,6): error TS2304: Cannot find name 'x'.
@@ -7,7 +7,7 @@ tests/cases/compiler/indexWithoutParamType2.ts(3,6): error TS2304: Cannot find n
// Used to be indexer, now it is a computed property
[x]: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'x'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
class C {
[e] = 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
class C {
[e]();
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
}
@@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts(1,10): error TS1170: A computed property name in a type literal must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts(1,10): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts(1,11): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName13.ts (2 errors) ====
var v: { [e]: number };
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
@@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts(1,10): error TS1170: A computed property name in a type literal must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts(1,10): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts(1,11): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName14.ts (2 errors) ====
var v: { [e](): number };
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
@@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts(1,31): error TS1170: A computed property name in a type literal must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts(1,31): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts(1,32): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName15.ts (2 errors) ====
var v: { [e: number]: string; [e]: number };
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
@@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts(1,10): error TS1170: A computed property name in a type literal must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts(1,10): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts(1,11): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName18.ts (2 errors) ====
var v: { [e]?(): number };
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
@@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts(1,10): error TS1170: A computed property name in a type literal must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts(1,10): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts(1,11): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName19.ts (2 errors) ====
var v: { [e]? };
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts(2,5): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts(2,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName20.ts(2,6): error TS2304: Cannot find name 'e'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
interface I {
[e](): number
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts(2,5): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts(2,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName21.ts(2,6): error TS2304: Cannot find name 'e'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
interface I {
[e]: number
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts(2,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName22.ts(2,6): error TS2304: Cannot find name 'e'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
declare class C {
[e]: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts(3,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts(3,6): error TS2304: Cannot find name 'e'.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName25.ts(4,6): error TS2304: Cannot find name 'e2'.
@@ -8,7 +8,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
// No ASI
[e] = 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
[e2] = 1
@@ -1,6 +1,6 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(2,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(2,6): error TS2304: Cannot find name 'e'.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(3,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName28.ts(3,6): error TS2304: Cannot find name 'e2'.
@@ -8,12 +8,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
class C {
[e]: number = 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
[e2]: 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 directly refer to a built-in symbol.
~~
!!! error TS2304: Cannot find name 'e2'.
}
@@ -1,7 +1,7 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(3,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(3,6): error TS2304: Cannot find name 'e'.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(3,11): error TS2304: Cannot find name 'id'.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(4,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName29.ts(4,6): error TS2304: Cannot find name 'e2'.
@@ -10,14 +10,14 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
// yes ASI
[e] = id++
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
~~
!!! error TS2304: Cannot find name 'id'.
[e2]: 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 directly refer to a built-in symbol.
~~
!!! error TS2304: Cannot find name 'e2'.
}
@@ -1,6 +1,6 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(3,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(3,6): error TS2304: Cannot find name 'e'.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(4,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName31.ts(4,6): error TS2304: Cannot find name 'e2'.
@@ -9,12 +9,12 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
// yes ASI
[e]: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
[e2]: 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 directly refer to a built-in symbol.
~~
!!! error TS2304: Cannot find name 'e2'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts(2,5): error TS1165: A computed property name in an ambient context must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName32.ts(2,6): error TS2304: Cannot find name 'e'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
declare class C {
[e](): number
~~~
!!! error TS1165: A computed property name in an ambient context must directly refer to a built-in Symbol.
!!! error TS1165: A computed property name in an ambient context must directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName36.ts(2,6): error TS2304: Cannot find name 'public'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
class C {
[public ]: 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 directly refer to a built-in symbol.
~~~~~~
!!! error TS2304: Cannot find name 'public'.
}
@@ -1,9 +1,9 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName41.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName41.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName41.ts (1 errors) ====
var v = {
[0 in []]: true
~~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
class C {
[e]
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts(2,11): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName8.ts(2,12): error TS2304: Cannot find name 'e'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
class C {
public [e]
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'.
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'.
@@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedP
class C {
[e]: Type
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
~~~~
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts(2,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName1.ts(2,6): error TS2304: Cannot find name 'e'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5Comput
declare class C {
[e]: 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts(2,4): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName10.ts(2,5): error TS2304: Cannot find name 'e'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5Comput
class C {
[e] = 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts(2,4): error TS1168: A computed property name in a method overload must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName11.ts(2,5): error TS2304: Cannot find name 'e'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5Comput
class C {
[e]();
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts(2,5): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts(2,5): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName5.ts(2,6): error TS2304: Cannot find name 'e'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5Comput
interface I {
[e]: number
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts(2,4): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName7.ts(2,5): error TS2304: Cannot find name 'e'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5Comput
class C {
[e]
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
}
@@ -1,10 +1,10 @@
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts(1,10): error TS1170: A computed property name in a type literal must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts(1,10): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts(1,11): error TS2304: Cannot find name 'e'.
==== tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName8.ts (2 errors) ====
var v: { [e]: number };
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts(2,4): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts(2,5): error TS2304: Cannot find name 'e'.
tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5ComputedPropertyName9.ts(2,9): error TS2304: Cannot find name 'Type'.
@@ -7,7 +7,7 @@ tests/cases/conformance/parser/ecmascript5/ComputedPropertyNames/parserES5Comput
class C {
[e]: Type
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'e'.
~~~~
@@ -1,9 +1,9 @@
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer1.ts(2,9): error TS1188: 'Symbol' indexers are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer1.ts(2,9): error TS1188: 'symbol' indexers are only available when targeting ECMAScript 6 and higher.
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer1.ts (1 errors) ====
interface I {
[s: symbol]: string;
~~~~~~
!!! error TS1188: 'Symbol' indexers are only available when targeting ECMAScript 6 and higher.
!!! error TS1188: 'symbol' indexers are only available when targeting ECMAScript 6 and higher.
}
@@ -1,9 +1,9 @@
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer2.ts(2,9): error TS1188: 'Symbol' indexers are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer2.ts(2,9): error TS1188: 'symbol' indexers are only available when targeting ECMAScript 6 and higher.
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer2.ts (1 errors) ====
class C {
[s: symbol]: string;
~~~~~~
!!! error TS1188: 'Symbol' indexers are only available when targeting ECMAScript 6 and higher.
!!! error TS1188: 'symbol' indexers are only available when targeting ECMAScript 6 and higher.
}
@@ -1,9 +1,9 @@
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer3.ts(2,9): error TS1188: 'Symbol' indexers are only available when targeting ECMAScript 6 and higher.
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer3.ts(2,9): error TS1188: 'symbol' indexers are only available when targeting ECMAScript 6 and higher.
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolIndexer3.ts (1 errors) ====
var x: {
[s: symbol]: string;
~~~~~~
!!! error TS1188: 'Symbol' indexers are only available when targeting ECMAScript 6 and higher.
!!! error TS1188: 'symbol' indexers are only available when targeting ECMAScript 6 and higher.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(2,9): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(2,9): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(2,10): error TS2304: Cannot find name 'p'.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(3,9): error TS1021: An index signature must have a type annotation.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature11.ts(4,10): error TS1096: An index signature must have exactly one parameter.
@@ -8,7 +8,7 @@ tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature1
interface I {
[p]; // Used to be indexer, now it is a computed property
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'p'.
[p1: string];
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts(2,3): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts(2,3): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4.ts(2,4): error TS2304: Cannot find name 'a'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature4
interface I {
[a = 0] // Used to be indexer, now it is a computed property
~~~~~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'a'.
}
@@ -1,4 +1,4 @@
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts(2,3): error TS1169: A computed property name in an interface must directly refer to a built-in Symbol.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts(2,3): error TS1169: A computed property name in an interface must directly refer to a built-in symbol.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5.ts(2,4): error TS2304: Cannot find name 'a'.
@@ -6,7 +6,7 @@ tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature5
interface I {
[a] // Used to be indexer, now it is a computed property
~~~
!!! 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 directly refer to a built-in symbol.
~
!!! error TS2304: Cannot find name 'a'.
}
@@ -1,9 +1,9 @@
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature6.ts(2,4): error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature6.ts(2,4): error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
==== tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature6.ts (1 errors) ====
interface I {
[a:boolean]
~
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
}
@@ -1,12 +1,12 @@
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature8.ts(1,13): error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature8.ts(2,14): error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature8.ts(1,13): error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature8.ts(2,14): error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
==== tests/cases/conformance/parser/ecmascript5/IndexSignatures/parserIndexSignature8.ts (2 errors) ====
var foo: { [index: any]; }; // expect an error here
~~~~~
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
var foo2: { [index: RegExp]; }; // expect an error here
~~~~~
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'Symbol'.
!!! error TS1023: An index signature parameter type must be 'string', 'number', or 'symbol'.
@@ -1,4 +1,4 @@
tests/cases/compiler/propertyAssignment.ts(6,13): error TS1170: A computed property name in a type literal must directly refer to a built-in Symbol.
tests/cases/compiler/propertyAssignment.ts(6,13): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol.
tests/cases/compiler/propertyAssignment.ts(6,14): error TS2304: Cannot find name 'index'.
tests/cases/compiler/propertyAssignment.ts(14,1): error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'.
tests/cases/compiler/propertyAssignment.ts(16,1): error TS2322: Type '{ x: number; }' is not assignable to type '() => void'.
@@ -12,7 +12,7 @@ tests/cases/compiler/propertyAssignment.ts(16,1): error TS2322: Type '{ x: numbe
var foo2: { [index]; } // should be an error, 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 directly refer to a built-in symbol.
~~~~~
!!! error TS2304: Cannot find name 'index'.
var bar2: { x : number; }
@@ -1,6 +1,6 @@
tests/cases/conformance/es6/Symbols/symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/Symbols/symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/Symbols/symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/Symbols/symbolProperty3.ts(3,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/Symbols/symbolProperty3.ts(4,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
tests/cases/conformance/es6/Symbols/symbolProperty3.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
==== tests/cases/conformance/es6/Symbols/symbolProperty3.ts (3 errors) ====
@@ -8,13 +8,13 @@ tests/cases/conformance/es6/Symbols/symbolProperty3.ts(5,9): error TS2464: A com
var x = {
[s]: 0,
~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
[s]() { },
~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
get [s]() {
~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
return 0;
}
}
@@ -1,9 +1,9 @@
tests/cases/conformance/es6/Symbols/symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
tests/cases/conformance/es6/Symbols/symbolProperty53.ts(2,5): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
==== tests/cases/conformance/es6/Symbols/symbolProperty53.ts (1 errors) ====
var obj = {
[Symbol.for]: 0
~~~~~~~~~~~~
!!! error TS2464: A computed property name must be of type 'string', 'number', 'Symbol', or 'any'.
!!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'.
};
@@ -1,15 +1,15 @@
tests/cases/conformance/es6/Symbols/symbolProperty7.ts(2,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/es6/Symbols/symbolProperty7.ts(3,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in Symbol.
tests/cases/conformance/es6/Symbols/symbolProperty7.ts(2,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
tests/cases/conformance/es6/Symbols/symbolProperty7.ts(3,5): error TS1166: A computed property name in a class property declaration must directly refer to a built-in symbol.
==== tests/cases/conformance/es6/Symbols/symbolProperty7.ts (2 errors) ====
class C {
[Symbol()] = 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 directly refer to a built-in symbol.
[Symbol()]: 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 directly refer to a built-in symbol.
[Symbol()]() { }
get [Symbol()]() {
return 0;