Don't attempt to report signature candidate errors on relation overflows#63122
Open
Andarist wants to merge 1 commit intomicrosoft:mainfrom
Open
Don't attempt to report signature candidate errors on relation overflows#63122Andarist wants to merge 1 commit intomicrosoft:mainfrom
Andarist wants to merge 1 commit intomicrosoft:mainfrom
Conversation
Collaborator
|
This PR doesn't have any linked issues. Please open an issue that references this PR. From there we can discuss and prioritise. |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This is tricky and I don't have a test case that could be committed to cover for this (I have one that times out on me locally unless I bump the timeout significantly and it would surely time out on CI).
It is possible for
chooseOverloadto run into an excessive complexity error when checking the argument's type against the parameter's type. But that doesn't guarantee the same error failure will happen whengetSignatureApplicabilityErrorgets called again for error reporting purposes.At this time, the relation caches might be "partially" warm already and the same-ish relation check might, this time, run under the limit and produce no error. This is, likely, especially true when dealing with object literals - given each
checkObjectLiteralproduces a new type identity (and thus that type itself won't reuse spoiled/failed entries from the relation cache).This can lead to hitting an existing assert: "No error for last overload signature". It can be observed after:
d1633a1c44dd2423623bd52cad8224213ed5ebednpx hereby runtests --tests="crossProductUnionIntersectionRepeatedPropDeclarationsNoOOM2" --no-lint --timeout 24000000(it should complete way before the specified timeout but the chances it won't complete under default 40s are high)0a222aa53e03c20233fdd52d6e47e69517cad04a(that's the cherry-picked commit from this PR)