Skip to content

Add file name to file-private virtual types during codegen #15897

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

Conversation

HertzDevil
Copy link
Contributor

This is exactly like #15505, but for Crystal::VirtualType and VirtualMetaclassType. Also ensures the ~match<...> internal functions use these file names for proper dynamic dispatch. This discovery led to this fixup in #15896.

Of the remaining internal types, GenericInstanceType, GenericClassInstanceMetaclassType, and GenericModuleInstanceMetaclassType call Type#to_s directly inside their #to_s_with_options overloads, without forwarding the codegen parameter. Most likely they are also broken in some way.

@HertzDevil HertzDevil added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:codegen labels Jun 13, 2025
@straight-shoota straight-shoota added this to the 1.17.0 milestone Jun 13, 2025
@straight-shoota straight-shoota merged commit 5acf3d4 into crystal-lang:master Jun 15, 2025
39 checks passed
@HertzDevil HertzDevil deleted the bug/virtual-codegen-namespace branch June 15, 2025 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:compiler:codegen
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants