mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-03 22:02:51 +01:00
The type must be complete to look for a witness for Destroy. Do this check through type completion rather than just checking to see if the ClassInfo says the definition is closed, since completing the type has side effects (resolves the self specific definition). Then look for whether the class is abstract through the CompleteTypeInfo instead of just looking at the inheritance type on ClassInfo, like type completion does. Last, FacetTypes are trivially destroyed just like TypeType.