odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.12k stars 550 forks source link

Improve support for `%w` #3749

Closed Feoramund closed 3 weeks ago

Feoramund commented 3 weeks ago

This PR fixes %w for bit_sets, enums inside bit_sets, matrices, and unions. I left pointers and pointers to procs alone, assuming they're not intended to be used with this verb. (Type_Info_Procedure does not currently provide a name either, so there's that.)

@Kelimion I've included a test that shows how everything will print out, if you'd like to review that to make sure it meets expectations. I made sure enums were explicit about their type name, if they had one, especially in an array of unions.

Resolves #3702

Kelimion commented 3 weeks ago

Thorough as usual. Thanks.