mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 16:38:05 -06:00
Syntax error for computed properties on method overloads
This commit is contained in:
parent
0e864143de
commit
98eda2bf5c
@ -131,6 +131,7 @@ module ts {
|
||||
Computed_property_names_are_not_allowed_in_an_ambient_context: { code: 1163, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in an ambient context." },
|
||||
Computed_property_names_are_not_allowed_in_class_property_declarations: { code: 1164, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in class property declarations." },
|
||||
Computed_property_names_are_only_available_when_targeting_ECMAScript_6_and_higher: { code: 1165, category: DiagnosticCategory.Error, key: "Computed property names are only available when targeting ECMAScript 6 and higher." },
|
||||
Computed_property_names_are_not_allowed_in_method_overloads: { code: 1166, category: DiagnosticCategory.Error, key: "Computed property names are not allowed in method overloads." },
|
||||
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." },
|
||||
|
||||
@ -515,6 +515,10 @@
|
||||
"category": "Error",
|
||||
"code": 1165
|
||||
},
|
||||
"Computed property names are not allowed in method overloads.": {
|
||||
"category": "Error",
|
||||
"code": 1166
|
||||
},
|
||||
|
||||
"Duplicate identifier '{0}'.": {
|
||||
"category": "Error",
|
||||
|
||||
@ -1,9 +1,12 @@
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts(2,4): error TS1166: Computed property names are not allowed in method overloads.
|
||||
tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts(2,4): error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts (1 errors) ====
|
||||
==== tests/cases/conformance/parser/ecmascript6/ComputedPropertyNames/parserComputedPropertyName11.ts (2 errors) ====
|
||||
class C {
|
||||
[e]();
|
||||
~~~
|
||||
!!! error TS1166: Computed property names are not allowed in method overloads.
|
||||
~~~
|
||||
!!! error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user