Skip to content

Commit 1b93265

Browse files
Merge pull request #3526 from Microsoft/removeGeneratorParameter
Remove generatorParameter and asyncParameter contexts.
2 parents 9a57e6f + 2e16680 commit 1b93265

File tree

57 files changed

+720
-732
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+720
-732
lines changed

src/compiler/binder.ts

Lines changed: 261 additions & 1 deletion
Large diffs are not rendered by default.

src/compiler/checker.ts

Lines changed: 50 additions & 265 deletions
Large diffs are not rendered by default.

src/compiler/diagnosticInformationMap.generated.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,8 +179,8 @@ namespace ts {
179179
A_class_declaration_without_the_default_modifier_must_have_a_name: { code: 1211, category: DiagnosticCategory.Error, key: "A class declaration without the 'default' modifier must have a name" },
180180
Identifier_expected_0_is_a_reserved_word_in_strict_mode: { code: 1212, category: DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode" },
181181
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1213, category: DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
182-
Type_expected_0_is_a_reserved_word_in_strict_mode: { code: 1215, category: DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode" },
183-
Type_expected_0_is_a_reserved_word_in_strict_mode_Class_definitions_are_automatically_in_strict_mode: { code: 1216, category: DiagnosticCategory.Error, key: "Type expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode." },
182+
Identifier_expected_0_is_a_reserved_word_in_strict_mode_Modules_are_automatically_in_strict_mode: { code: 1214, category: DiagnosticCategory.Error, key: "Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode." },
183+
Invalid_use_of_0_Modules_are_automatically_in_strict_mode: { code: 1215, category: DiagnosticCategory.Error, key: "Invalid use of '{0}'. Modules are automatically in strict mode." },
184184
Export_assignment_is_not_supported_when_module_flag_is_system: { code: 1218, category: DiagnosticCategory.Error, key: "Export assignment is not supported when '--module' flag is 'system'." },
185185
Experimental_support_for_decorators_is_a_feature_that_is_subject_to_change_in_a_future_release_Specify_experimentalDecorators_to_remove_this_warning: { code: 1219, category: DiagnosticCategory.Error, key: "Experimental support for decorators is a feature that is subject to change in a future release. Specify '--experimentalDecorators' to remove this warning." },
186186
Generators_are_only_available_when_targeting_ECMAScript_6_or_higher: { code: 1220, category: DiagnosticCategory.Error, key: "Generators are only available when targeting ECMAScript 6 or higher." },
@@ -398,6 +398,8 @@ namespace ts {
398398
Duplicate_identifier_0_Compiler_uses_declaration_1_to_support_async_functions: { code: 2520, category: DiagnosticCategory.Error, key: "Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions." },
399399
Expression_resolves_to_variable_declaration_0_that_compiler_uses_to_support_async_functions: { code: 2521, category: DiagnosticCategory.Error, key: "Expression resolves to variable declaration '{0}' that compiler uses to support async functions." },
400400
The_arguments_object_cannot_be_referenced_in_an_async_arrow_function_Consider_using_a_standard_async_function_expression: { code: 2522, category: DiagnosticCategory.Error, key: "The 'arguments' object cannot be referenced in an async arrow function. Consider using a standard async function expression." },
401+
yield_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2523, category: DiagnosticCategory.Error, key: "'yield' expressions cannot be used in a parameter initializer." },
402+
await_expressions_cannot_be_used_in_a_parameter_initializer: { code: 2524, category: DiagnosticCategory.Error, key: "'await' expressions cannot be used in a parameter initializer." },
401403
Import_declaration_0_is_using_private_name_1: { code: 4000, category: DiagnosticCategory.Error, key: "Import declaration '{0}' is using private name '{1}'." },
402404
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}'." },
403405
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: { code: 4004, category: DiagnosticCategory.Error, key: "Type parameter '{0}' of exported interface has or is using private name '{1}'." },

src/compiler/diagnosticMessages.json

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -703,13 +703,13 @@
703703
"category": "Error",
704704
"code": 1213
705705
},
706-
"Type expected. '{0}' is a reserved word in strict mode": {
706+
"Identifier expected. '{0}' is a reserved word in strict mode. Modules are automatically in strict mode.": {
707707
"category": "Error",
708-
"code": 1215
708+
"code": 1214
709709
},
710-
"Type expected. '{0}' is a reserved word in strict mode. Class definitions are automatically in strict mode.": {
710+
"Invalid use of '{0}'. Modules are automatically in strict mode.": {
711711
"category": "Error",
712-
"code": 1216
712+
"code": 1215
713713
},
714714
"Export assignment is not supported when '--module' flag is 'system'.": {
715715
"category": "Error",
@@ -1570,7 +1570,6 @@
15701570
"category": "Error",
15711571
"code": 2505
15721572
},
1573-
15741573
"Duplicate identifier '{0}'. Compiler uses declaration '{1}' to support async functions.": {
15751574
"category": "Error",
15761575
"code": 2520
@@ -1583,6 +1582,14 @@
15831582
"category": "Error",
15841583
"code": 2522
15851584
},
1585+
"'yield' expressions cannot be used in a parameter initializer.": {
1586+
"category": "Error",
1587+
"code": 2523
1588+
},
1589+
"'await' expressions cannot be used in a parameter initializer.": {
1590+
"category": "Error",
1591+
"code": 2524
1592+
},
15861593

15871594
"Import declaration '{0}' is using private name '{1}'.": {
15881595
"category": "Error",

0 commit comments

Comments
 (0)