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

Fix deduction crash for function with missing parameters. #4461

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

jonmeow
Copy link
Contributor

@jonmeow jonmeow commented Oct 31, 2024

This is because var x:! () = (); modifies the binding index, which causes A to be generic, which causes the params to be used, which crashes. There may be another issue to fix here so that the invalid binding doesn't modify the binding index, but at least param_patterns_id should probably be set consistently with params_id.

@zygoloid zygoloid added this pull request to the merge queue Oct 31, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Oct 31, 2024
@jonmeow jonmeow added this pull request to the merge queue Oct 31, 2024
Merged via the queue into carbon-language:trunk with commit f70221c Oct 31, 2024
10 checks passed
@jonmeow jonmeow deleted the deduction-crash branch October 31, 2024 17:25
github-merge-queue bot pushed a commit that referenced this pull request Oct 31, 2024
…#4463)

Related to #4461, more generally try not to produce a compile-time
binding when the code shouldn't be able to do so.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants