Skip to content

Conversation

@magic-akari
Copy link
Contributor

Copilot AI review requested due to automatic review settings May 28, 2025 06:54
@github-project-automation github-project-automation bot moved this to Not started in PR Backlog May 28, 2025
@typescript-bot typescript-bot added For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels May 28, 2025
Copy link
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 introduces a diagnostic change in the checker to report an error when a bigint literal is used as an enum key, and updates tests and baseline files accordingly.

  • Added a test case (enumWithBugint.ts) that defines an enum using a bigint literal as a key.
  • Updated the TypeScript checker logic to emit an error for numeric and BigInt literals used as enum member names.
  • Refreshed baseline files (types, symbols, JS, errors) to reflect the updated diagnostic messages.

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

File Description
tests/cases/compiler/enumWithBugint.ts New test case to verify error reporting for bigint enum keys
tests/baselines/reference/enumWithBugint.{types,symbols,js,errors.txt} Updated baselines to accommodate the new error message
src/compiler/checker.ts Added error checking for BigInt literals in enum member names

@github-project-automation github-project-automation bot moved this from Not started to Needs merge in PR Backlog Jun 5, 2025
@jakebailey jakebailey enabled auto-merge (squash) June 5, 2025 23:37
@jakebailey jakebailey merged commit ac03ba4 into microsoft:main Jun 5, 2025
32 checks passed
@typescript-bot typescript-bot removed the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Jun 5, 2025
@github-project-automation github-project-automation bot moved this from Needs merge to Done in PR Backlog Jun 5, 2025
@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Jun 5, 2025
@magic-akari magic-akari deleted the fix/issue-61772 branch June 6, 2025 01:00
@microsoft microsoft locked as resolved and limited conversation to collaborators Dec 9, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

For Backlog Bug PRs that fix a backlog bug

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

enum member key should reject bigint

3 participants