Skip to content

fix(45049): Change phrasing for "default property value" diagnostic #45052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/compiler/diagnosticMessages.json
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@
"category": "Error",
"code": 1441
},
"Missing '=' before default property value.": {
"Expected '=' for property initializer.": {
"category": "Error",
"code": 1442
},
Expand Down
2 changes: 1 addition & 1 deletion src/compiler/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1664,7 +1664,7 @@ namespace ts {
parseErrorAtCurrentToken(Diagnostics._0_expected, tokenToString(SyntaxKind.SemicolonToken));
}
else {
parseErrorAtCurrentToken(Diagnostics.Missing_before_default_property_value);
parseErrorAtCurrentToken(Diagnostics.Expected_for_property_initializer);
}
return;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable2.ts(12,20): error TS2304: Cannot find name 'C'.
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable2.ts(12,22): error TS1442: Missing '=' before default property value.
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable2.ts(12,22): error TS1442: Expected '=' for property initializer.


==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariables/parserErrorRecovery_IncompleteMemberVariable2.ts (2 errors) ====
Expand All @@ -18,7 +18,7 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/IncompleteMemberVariabl
~
!!! error TS2304: Cannot find name 'C'.
~~~~~~~
!!! error TS1442: Missing '=' before default property value.
!!! error TS1442: Expected '=' for property initializer.
// Constructor
constructor (public x: number, public y: number) { }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAcces
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(6,15): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(8,22): error TS2340: Only public and protected methods of the base class are accessible via the 'super' keyword.
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(10,15): error TS2304: Cannot find name 'super'.
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(12,12): error TS1442: Missing '=' before default property value.
tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts(12,12): error TS1442: Expected '=' for property initializer.


==== tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAccessibility.ts (5 errors) ====
Expand All @@ -29,5 +29,5 @@ tests/cases/conformance/classes/members/accessibility/privateInstanceMemberAcces

a: this.foo; // error
~
!!! error TS1442: Missing '=' before default property value.
!!! error TS1442: Expected '=' for property initializer.
}