Skip to content
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

Limit the number of rendered overloads on signature mismatch #10890

Merged

Conversation

caspiano
Copy link
Contributor

@caspiano caspiano commented Jul 3, 2021

Fixes #9880

Looking for feedback on a sane limit to the number of rendered overloads 👀

@caspiano caspiano marked this pull request as ready for review July 3, 2021 15:41
Co-authored-by: Sijawusz Pur Rahnama <[email protected]>
@HertzDevil
Copy link
Contributor

I don't think this prevents missing itself from having millions of elements.

@caspiano
Copy link
Contributor Author

caspiano commented Jul 4, 2021

@HertzDevil good point. I'm just wrapping my head around the matching code and then I will update this PR

@caspiano
Copy link
Contributor Author

caspiano commented Jul 4, 2021

@HertzDevil looks like these changes fix the issue. I think a little bit more of an involved refactor would be required for failing before exhausting the missing array

The output of OP's example against these changes can be found here

Copy link
Member

@beta-ziliani beta-ziliani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a sensible change, even if it won't limit the number of overloads found

@beta-ziliani beta-ziliani added this to the 1.4.0 milestone Mar 8, 2022
@straight-shoota straight-shoota merged commit 85c265d into crystal-lang:master Mar 10, 2022
@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:semantic labels Mar 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:semantic
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Compiler crashed: Invalid memory access (signal 11) at address 0x7f44967ea000
6 participants