Handle when associated name can be undefined#41285
Closed
sheetalkamat wants to merge 1 commit intomasterfrom
Closed
Handle when associated name can be undefined#41285sheetalkamat wants to merge 1 commit intomasterfrom
sheetalkamat wants to merge 1 commit intomasterfrom
Conversation
weswigham
approved these changes
Oct 27, 2020
Member
weswigham
left a comment
There was a problem hiding this comment.
associatedNames being present-but-empty/differing-in-length-from-the-types seems like a smell that should be fixed elsewhere, but I'll accept this as a fix.
weswigham
reviewed
Oct 27, 2020
| ~~~~~~~~ | ||
| !!! error TS2684: The 'this' context of type '<T>(...items: T[]) => T[]' is not assignable to method's 'this' of type '(this: () => void) => unknown[]'. | ||
| !!! error TS2684: Types of parameters 'items' and 'args_0' are incompatible. | ||
| !!! error TS2684: Type 'any' is not assignable to type 'never'. |
Member
There was a problem hiding this comment.
....? This error seems.... odd. Why are we even comparing non-this parameter types (one of the signatures doesn't have any non-this parameters)?
ahejlsberg
reviewed
Oct 28, 2020
Member
ahejlsberg
left a comment
There was a problem hiding this comment.
I don't think this is the right fix. The issue here is that we're asking for a parameter name with an out of bounds index, which shouldn't happen. The real fix is to make sure it doesn't. I will add more info in the original issue and put up a new PR.
Member
|
I have put up a new fix in #41308. |
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.
Fixes #40251