Skip to content

Consistently resolve to the errorType on arguments with error#62549

Merged
jakebailey merged 1 commit into
microsoft:mainfrom
Andarist:consistent-error-type-on-errored-arguments
Oct 5, 2025
Merged

Consistently resolve to the errorType on arguments with error#62549
jakebailey merged 1 commit into
microsoft:mainfrom
Andarist:consistent-error-type-on-errored-arguments

Conversation

@Andarist

@Andarist Andarist commented Oct 5, 2025

Copy link
Copy Markdown
Contributor

This PR fixes this inconsistency:

function Cls() {
  return class T {
     a = () => arguments // 'arguments' cannot be referenced in property initializers or class static initialization blocks.(2815)
     //        ^? (local var) arguments: IArguments

     static {
      arguments // 'arguments' cannot be referenced in property initializers or class static initialization blocks.(2815)
      // ^? (local var) arguments: any
     }
  }
}

It feels like #48172 forgot to update this one isInPropertyInitializerOrClassStaticBlock call.

@github-project-automation github-project-automation Bot moved this to Not started in PR Backlog Oct 5, 2025
@typescript-bot typescript-bot added the For Uncommitted Bug PR for untriaged, rejected, closed or missing bug label Oct 5, 2025
@typescript-bot

Copy link
Copy Markdown
Contributor

This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise.

@jakebailey jakebailey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah, this is an oops.

@github-project-automation github-project-automation Bot moved this from Not started to Needs merge in PR Backlog Oct 5, 2025
@jakebailey jakebailey merged commit 6ba7d35 into microsoft:main Oct 5, 2025
33 checks passed
@github-project-automation github-project-automation Bot moved this from Needs merge to Done in PR Backlog Oct 5, 2025
@microsoft microsoft locked as resolved and limited conversation to collaborators Apr 6, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

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