-
Notifications
You must be signed in to change notification settings - Fork 12.8k
fix(49223): checker.getTypeAtLocation for ExpressionWithTypeArguments returns an error any type #49284
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
Conversation
That was quick! Thanks! |
@typescript-bot cherry-pick this to release-4.7 |
Heya @DanielRosenwasser, I've started to run the task to cherry-pick this into |
Hey @DanielRosenwasser, I've opened #49346 for you. |
Ugh, sorry. Would you be able to accept baselines? |
Doing this pretty much wrecks every class ContextMenu extends EventManager {
// ...
} has the following diff >ContextMenu : ContextMenu
- >EventManager : EventManager
+ >EventManager : typeof EventManager
+ >EventManager : typeof EventManager |
It also breaks how find-all-refs seems to work. // === /tests/cases/fourslash/findAllRefsForStaticInstanceMethodInheritance.ts ===
// class X{
// /*FIND ALL REFS*/[|foo|](): void{}
// }
//
// class Y extends X{
// static foo(): void{}
// }
//
// class Z extends Y{
// static foo(): void{}
- // [|foo|](): void{}
+ // foo(): void{}
// }
//
// const x = new X();
// const y = new Y();
// const z = new Z();
// x.[|foo|]();
// y.[|foo|]();
- // z.[|foo|]();
+ // z.foo();
// Y.foo();
// Z.foo(); @ahejlsberg @RyanCavanaugh @andrewbranch to be honest, I am considering putting this into a 4.7.4 change unless others can help guide this PR today. |
Unless we just revert my change at 1394d80 and go with @a-tarasyuk's original change. |
I would go with |
Everything seems to pass with just that. |
@typescript-bot cherry-pick this to release-4.7 |
Heya @DanielRosenwasser, I've started to run the task to cherry-pick this into |
Hey @DanielRosenwasser, I couldn't open a PR with the cherry-pick. (You can check the log here). You may need to squash and pick this PR into release-4.7 manually. |
… returns an error any type (#49284) * fix(49223): handle ExpressionWithTypeArguments nodes in isExpressionNode * Update src/compiler/utilities.ts * Just use `!isHeritageClause(node.parent)`. Co-authored-by: Daniel Rosenwasser <[email protected]>
… returns an error any type (#49284) (#49369) * fix(49223): handle ExpressionWithTypeArguments nodes in isExpressionNode * Update src/compiler/utilities.ts * Just use `!isHeritageClause(node.parent)`. Co-authored-by: Daniel Rosenwasser <[email protected]> Co-authored-by: Oleksandr T <[email protected]>
Fixes #49223