Skip to content

Error handling test#62219

Closed
johnfav03 wants to merge 10 commits intomicrosoft:mainfrom
johnfav03:main
Closed

Error handling test#62219
johnfav03 wants to merge 10 commits intomicrosoft:mainfrom
johnfav03:main

Conversation

@johnfav03
Copy link
Copy Markdown
Contributor

Fixes #

Copilot AI review requested due to automatic review settings August 6, 2025 20:36
@github-project-automation github-project-automation bot moved this to Not started in PR Backlog Aug 6, 2025
@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Aug 6, 2025
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

This PR adds a new TypeScript compiler error that prevents comparison operations (except equality) between string literals. The change introduces validation to catch potentially problematic string literal comparisons during compilation.

Key changes:

  • Adds a new error diagnostic for string literal comparisons
  • Implements compiler logic to detect and report string literal comparison operations
  • Creates test case to validate the new error behavior

Reviewed Changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 2 comments.

File Description
tests/cases/compiler/StringComp.ts Test case demonstrating string literal comparison that should trigger the new error
tests/baselines/reference/stringComp.* Baseline files for the new compiler test (types, symbols, and JS output)
src/compiler/diagnosticMessages.json New error message for string literal comparison restriction
src/compiler/checker.ts Compiler logic to detect and report string literal comparison errors
Comments suppressed due to low confidence (2)

@johnfav03 johnfav03 marked this pull request as draft August 6, 2025 20:39
johnfav03 and others added 7 commits August 6, 2025 15:44
… group (microsoft#62006)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@github-project-automation github-project-automation bot moved this from Not started to Done in PR Backlog Mar 24, 2026
@typescript-bot
Copy link
Copy Markdown
Collaborator

With 6.0 out as the final release vehicle for this codebase, we're closing all PRs that don't fit the merge criteria for post-6.0 patches. If you think this was a mistake and this PR fits the post-6.0 patch criteria, please post to the 6.0 iteration issue with details (specifically, which PR and which patch criteria it satisfies).

Next steps for PRs:

  • For crash bugfixes or language service improvements, PRs are currently accepted at the typescript-go repo
  • Changes to type system behavior should wait until after 7.0, at which point mainline TypeScript development will resume in this repository with the Go codebase
  • Library file updates (lib.d.ts etc) continue to live in this repo or the DOM Generator repo as appropriate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants