mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-18 02:30:29 +00:00
Since #7840, `SubobjectDestroy.Op` for a class destroys each field by looking it up by name. A choice's discriminant field has a special name that isn't in the class's scope, so any function-local `var` of choice type failed with ``member name `discriminant` not found``. Skip the discriminant the same way as the vptr, since neither is a named member and both are trivially destructible. Assisted-by: Claude Code with Claude Opus 5.5 --------- Co-authored-by: popcoder565 <339285150+popcoder565@users.noreply.github.com>