Skip to content
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

Regression: Compiler crash on call expression with private identifier on an any typed variable in 4.2RC #42860

Closed
dragomirtitian opened this issue Feb 18, 2021 · 2 comments · Fixed by #42861
Labels
Bug A bug in TypeScript Crash For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output Fix Available A PR has been opened for this issue

Comments

@dragomirtitian
Copy link
Contributor

dragomirtitian commented Feb 18, 2021

Bug Report

🔎 Search Terms

A call expression with a private identifier coming from an any typed variable crashes the compiler

🕗 Version & Regression Information

  • This is a crash
  • This changed between versions 4.1 and 4.2
class A {
    #m: () => void
    method(thing: any) {
        thing.#m();
    }
};
Compiler Options
{
  "compilerOptions": {
    "noImplicitAny": true,
    "strictNullChecks": true,
    "strictFunctionTypes": true,
    "strictPropertyInitialization": true,
    "strictBindCallApply": true,
    "noImplicitThis": true,
    "noImplicitReturns": true,
    "alwaysStrict": true,
    "esModuleInterop": true,
    "declaration": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "moduleResolution": 2,
    "target": "ES2017",
    "jsx": "React",
    "module": "ESNext"
  }
}

Playground Link: Provided

🙁 Actual behavior

Compiler crashes

🙂 Expected behavior

Compiler should not crash.

Regression appears to have been introduced in fix for #42166 (PR)

@dragomirtitian
Copy link
Contributor Author

Should have a PR up shortly.

dragomirtitian added a commit to bloomberg/TypeScript that referenced this issue Feb 18, 2021
@DanielRosenwasser DanielRosenwasser added Bug A bug in TypeScript Crash For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output labels Feb 18, 2021
@DanielRosenwasser DanielRosenwasser added this to the TypeScript 4.2.2 milestone Feb 18, 2021
@DanielRosenwasser DanielRosenwasser added the Fix Available A PR has been opened for this issue label Feb 18, 2021
dragomirtitian added a commit to bloomberg/TypeScript that referenced this issue Feb 18, 2021
DanielRosenwasser pushed a commit that referenced this issue Feb 18, 2021
typescript-bot pushed a commit to typescript-bot/TypeScript that referenced this issue Feb 18, 2021
Component commits:
21eb38b Fix for crash when using ca call expression on private identifier coming from an any typed variable. (GH microsoft#42860)
@robpalme
Copy link

Thank you for the lightning fast turnaround on this.

DanielRosenwasser pushed a commit that referenced this issue Feb 18, 2021
Component commits:
21eb38b Fix for crash when using ca call expression on private identifier coming from an any typed variable. (GH #42860)

Co-authored-by: Titian Cernicova-Dragomir <tcernicovad1@bloomberg.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Crash For flagging bugs which are compiler or service crashes or unclean exits, rather than bad output Fix Available A PR has been opened for this issue
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants