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

Add a check for correct Array shape in quotes.reflect.ClassOfConstant #22033

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jchyb
Copy link
Contributor

@jchyb jchyb commented Nov 26, 2024

Closes #21916
I tried to supply the ClassOfConstant with multiple other broken Types, but I was unable to break it beyond the linked issue, so I ended up adding the check for only that one case. This makes sense - the backend (and thus erasure) needs to know if the Array type parameter is a primitive type, but in other cases the erasure phase needs to know only the class, without the type parameters.

It's impossible to call classOf through the quoted code ('{classOf[t]} with a boundless t will error out), so we don't need that additional check there.

There does appear to be an issue with being able to set '{List[Array]} resulting in a crash, but that is beyond the scope of this fix - I will prepare a separate issue for that (edit: reported here).

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.

assertion failed: class Array while introspecting Array[Byte] in a macro
2 participants