-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Fix get candidate for overload failure checking #36744
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
This re-adds the missed errors and marks as used missed nodes from the user and RWC baselines.
It was redundant with the old tests
@weswigham can you take a look? I'll assign you officially once the reviewers list loads. |
function getCandidateForOverloadFailure( | ||
node: CallLikeExpression, | ||
candidates: Signature[], | ||
args: readonly Expression[], | ||
hasCandidatesOutArray: boolean, | ||
): Signature { | ||
Debug.assert(candidates.length > 0); // Else should not have called this. | ||
resolveUntypedCall(node); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sandersn do you want to consider deferring this to the end of somehow (since it just needs to happen once for errors to be reported and usage to be painted, rather than on every attempted resolution)? Like how we have checkNodeDeferred
? This does fix parameter types, and looking at the baselines, the parameter types we get from deferring this may be nicer that what's here.
Like this change is what I'm proposing - it looks like it minimizes the baseline diff a lot.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable. I'll give it a try.
…rameter types fixed by overload signatures
OK, I just took your commit.
|
|
Nope, it's actually called by things like |
Fixes user and rwc test regressions, which I didn't file a bug for.