Skip to content

Fix redundant leading apostrophe in TS1344 diagnostic message#63341

Merged
RyanCavanaugh merged 3 commits intomainfrom
copilot/fix-redundant-leading-apostrophe
Apr 2, 2026
Merged

Fix redundant leading apostrophe in TS1344 diagnostic message#63341
RyanCavanaugh merged 3 commits intomainfrom
copilot/fix-redundant-leading-apostrophe

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 2, 2026

The TS1344 diagnostic message had a spurious leading ' baked into its key in diagnosticMessages.json, causing the error to render as:

'A label is not allowed here.

instead of:

A label is not allowed here.

Changes

  • src/compiler/diagnosticMessages.json — Remove leading ' from the 1344 message key. The generated identifier A_label_is_not_allowed_here is unaffected; no changes needed in binder.ts or program.ts.
  • 27 baseline test files — Update expected error output to drop the leading '.

Copilot AI changed the title [WIP] Fix redundant leading apostrophe in ts1344 diagnostic Fix redundant leading apostrophe in TS1344 diagnostic message Apr 2, 2026
Copilot AI requested a review from RyanCavanaugh April 2, 2026 16:34
Copy link
Copy Markdown
Member

@RyanCavanaugh RyanCavanaugh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot revert all changes under /loc and store a memory that you are not allowed to edit this as part of a PR

Agent-Logs-Url: https://github.com/microsoft/TypeScript/sessions/a744264b-2dc7-4e98-ad24-9d62ce1fd801

Co-authored-by: RyanCavanaugh <6685088+RyanCavanaugh@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 2, 2026

@copilot revert all changes under /loc and store a memory that you are not allowed to edit this as part of a PR

Done — reverted all changes under src/loc in 700b59f. Also stored a memory to never edit /src/loc files in future PRs.

Copilot AI requested a review from RyanCavanaugh April 2, 2026 16:42
@RyanCavanaugh RyanCavanaugh marked this pull request as ready for review April 2, 2026 16:43
Copilot AI review requested due to automatic review settings April 2, 2026 16:43
Copy link
Copy Markdown
Member

@jakebailey jakebailey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, this has been here since probably forever

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes the user-facing text for diagnostic TS1344 by removing an unintended leading apostrophe that was embedded in the compiler’s diagnostic message source, and updates affected test baselines accordingly.

Changes:

  • Update src/compiler/diagnosticMessages.json to remove the spurious leading ' from the TS1344 message text.
  • Update reference baseline .errors.txt files to match the corrected TS1344 output (no leading apostrophe).

Reviewed changes

Copilot reviewed 29 out of 29 changed files in this pull request and generated no comments.

File Description
src/compiler/diagnosticMessages.json Corrects the TS1344 message text by removing the unintended leading apostrophe.
tests/baselines/reference/*.errors.txt Updates expected diagnostic output for TS1344 to match the corrected message text.

@RyanCavanaugh RyanCavanaugh added this pull request to the merge queue Apr 2, 2026
Merged via the queue into main with commit 7b8cb3b Apr 2, 2026
42 of 44 checks passed
@RyanCavanaugh RyanCavanaugh deleted the copilot/fix-redundant-leading-apostrophe branch April 2, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Redundant leading apostrophe in the ts1344 diagnostic

4 participants