-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Avoid getting undefined callSignatures
/constructSignatures
in getPropertyOfType
#42766
Conversation
Looks like lots of failing tests from CI, so this fix may not be as simple as we thought it was. |
…tPropertyOfType` e350c35 (microsoft#40228) introduced a subtle bug: it switched the flags to an alias, dropping `SymbolFlags.Property` --- and that makes `symbolIsValue()` get to the `resolveAlias(symbol)` call, which leads to `getPropertyOfType()` with`resolved.callSignatures`+`constructSignatures` being `undefined`. So initialize them in `setStructuredTypeMembers` before calling `getNamedMembers()`. Fixes microsoft#42350
Should be fixed now. |
This didn’t make it into 4.2. I’m assuming that was unintentional, since the bug was milestoned as 4.2.1? /cc @DanielRosenwasser @typescript-bot cherry-pick this to release-4.2 |
Heya @andrewbranch, I've started to run the task to cherry-pick this into |
Hey @andrewbranch, I've opened #42950 for you. |
Component commits: ed26816 Avoid getting undefined `callSignatures`/`constructSignatures` in `getPropertyOfType` e350c35 (microsoft#40228) introduced a subtle bug: it switched the flags to an alias, dropping `SymbolFlags.Property` --- and that makes `symbolIsValue()` get to the `resolveAlias(symbol)` call, which leads to `getPropertyOfType()` with`resolved.callSignatures`+`constructSignatures` being `undefined`. So initialize them in `setStructuredTypeMembers` before calling `getNamedMembers()`. Fixes microsoft#42350
Component commits: ed26816 Avoid getting undefined `callSignatures`/`constructSignatures` in `getPropertyOfType` e350c35 (#40228) introduced a subtle bug: it switched the flags to an alias, dropping `SymbolFlags.Property` --- and that makes `symbolIsValue()` get to the `resolveAlias(symbol)` call, which leads to `getPropertyOfType()` with`resolved.callSignatures`+`constructSignatures` being `undefined`. So initialize them in `setStructuredTypeMembers` before calling `getNamedMembers()`. Fixes #42350 Co-authored-by: Eli Barzilay <eli@barzilay.org>
e350c35 (#40228) introduced a subtle bug: it switched the flags to an
alias, dropping
SymbolFlags.Property
--- and that makessymbolIsValue()
get to theresolveAlias(symbol)
call, which leads togetPropertyOfType()
withresolved.callSignatures
+constructSignatures
being
undefined
. So initialize them insetStructuredTypeMembers
before calling
getNamedMembers()
.Fixes #42350