Skip to content

Fix #6064: Hardening in the presence of kind mismatches #6100

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

Merged
merged 2 commits into from
Mar 19, 2019

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Mar 18, 2019

Three fixes for when the number of type-parameters disagrees with the number of type arguments.
One is in TypeAccumulator, two more are in Substituters.

There's a tricky balance here. On the one hand, crashing early on mismatches is
an excellent means to pinpoint errors in the compiler. On the other hand,
it makes malformed input crash the compiler. So, we should
do the minimum so that "on the other hand" is not observed. Which means doing
this driven by counter-examples (coming from fuzzing or elsewhere) is not a
bad way to tackle the problem.

odersky added 2 commits March 18, 2019 09:37
Three fixes for when the number of type-parameters disagrees with the number of type arguments.
One is in TypeAccumulator, two more are in Substituters.

There's a tricky balance here. On the one hand, crashing early on mismatches is
an excellent means to pinpoint errors in the compiler. On the other hand,
it makes legal but nonsensical programs crash the compiler. So, we should
do the minimum so that "on the other hand" is not observed. Which means doing
this driven by counter-examples (coming from fuzzing or elsewhere) is not a
bad way to tackle the problem.
@odersky odersky merged commit c6feafe into scala:master Mar 19, 2019
@allanrenucci allanrenucci deleted the fix-#6064 branch March 19, 2019 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants