-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Guard against invalid prefixes in argForParam #23508
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
base: main
Are you sure you want to change the base?
Conversation
@jchyb Best effort from tasty fails here. The problem is that there is a deeply wrong condition in basic types which leads to a TypeError being thrown. During normal compilation the TypeError is caught and handled, but it seems duing best effort from tasty it is not. Should this handling be added to the fromTasty compiler and/or tests? |
@odersky Thank you for letting me know. I suspect I will have to catch and wrap the type with PreviousErrorType in best-effort-tasty unpickling (but I'll also look for a more elegant solution for that). |
We should come back to this and allow this test by catching the TypeError and reporting it.
@jchyb Thanks for the tip. I saw there are quite a few tests in the exclude list udne "cyclic reference crash". maybe these can be handled the same way? After all the CyclicReference exception is a subclass of TypeError. |
It looks like there are many situations where an illegal higher-kinded type in an argument for The root problem is that we cannot detect illegal kinds in arguments early enough to prevent these |
It looks like there are many situations where an illegal higher-kinded type in an argument for a value type parameter causes illegal TermRefs and TypeRefs to be constructed, leading to an assertion error. We now turn the assertion error into a specialized exception which eventually leads to a TypeError being thrown. The problem is we cannot detect illegal kinds in arguments early enough to prevent these situations. We do detect them later, but the damage can already be done before that.
Fixes #23504