Skip to content

Backport "Guard against invalid prefixes in argForParam" to 3.3 LTS #501

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

Closed
wants to merge 4 commits into from

Conversation

tgodzik
Copy link

@tgodzik tgodzik commented Jul 23, 2025

Backports scala#23508 to the 3.3.7.

PR submitted by the release tooling.
[skip ci]

odersky and others added 4 commits July 23, 2025 15:08
We should come back to this and allow this test by catching the TypeError
and reporting it.

[Cherry-picked 40e076d][modified]
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.

[Cherry-picked 4a959b1]
@tgodzik tgodzik closed this Jul 24, 2025
@tgodzik tgodzik deleted the backport-lts-3.3-23508 branch July 24, 2025 12:43
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