Avoid getting undefined callSignatures/constructSignatures in getPropertyOfType#42766
Merged
elibarzilay merged 1 commit intomicrosoft:masterfrom Feb 11, 2021
Merged
Avoid getting undefined callSignatures/constructSignatures in getPropertyOfType#42766elibarzilay merged 1 commit intomicrosoft:masterfrom
callSignatures/constructSignatures in getPropertyOfType#42766elibarzilay merged 1 commit intomicrosoft:masterfrom
Conversation
sandersn
approved these changes
Feb 11, 2021
Member
|
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
Contributor
Author
|
Should be fixed now. |
sandersn
approved these changes
Feb 11, 2021
Member
|
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 |
Collaborator
|
Heya @andrewbranch, I've started to run the task to cherry-pick this into |
Collaborator
|
Hey @andrewbranch, I've opened #42950 for you. |
typescript-bot
pushed a commit
to typescript-bot/TypeScript
that referenced
this pull request
Feb 25, 2021
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
RyanCavanaugh
pushed a commit
that referenced
this pull request
Feb 25, 2021
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>
This was referenced Mar 6, 2021
Merged
This was referenced Mar 17, 2021
chore(deps-dev): bump typescript from 3.9.9 to 4.2.3 in /deployments
hollanddd/second-rate.website#2
Closed
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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+constructSignaturesbeing
undefined. So initialize them insetStructuredTypeMembersbefore calling
getNamedMembers().Fixes #42350