mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:00:13 +01:00
Instead of wrapping `ClassStart` with `StartOnly` or `StartWithEnd`, provide both `ClassStart` and `ClassStartOnly`. Use inheritance to share the fields. Initializing the subclass as an aggregate is still possible, but requires an extra set of curlies. This flattens the switch in TypeStructureBuilder::Build to a single level. Since this puts 19 elements in the Any variant, we need to extend the CARBON_KIND_SWITCH support to more than 12 elements, so we bump it up to 24. This was suggested by @jonmeow here: https://github.com/carbon-language/carbon-lang/pull/5430#discussion_r2078444685