Skip to content

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

Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:bug/virtual-codegen-namespace
Jun 15, 2025
Merged

Add file name to file-private virtual types during codegen#15897
straight-shoota merged 1 commit intocrystal-lang:masterfrom
HertzDevil:bug/virtual-codegen-namespace

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