mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-24 21:20:11 +01:00
* Add `RequireCompleteFacetType` and `ResolveFacetTypeImplWitness` to `check::Context`. Goal was to move code from `impl.cpp` (mostly) without functional changes. * Complete type information is cached with the facet type, and is stored in a `complete_facet_types()` table. * Main functional change is to diagnose attempts to use a rewrite constraint on an associated function. Some existing diagnostics have been updated. * Remove `check::Context::RequireDefinedType`: * For class types, use `RequireCompleteType` * For facet types, use `RequireCompleteFacetType` * Introduce a `SemIR::SpecificInterface` to hold an interface and specific id pair. * Keep the specific interface ids in the impl object. * Avoid some extra copies in `Dump` functions. * Future work missing from this PR: * Resolving for member access or actions that require impl lookup. * Resolving rewrites constraints that refer to non-concrete values. * Any support for adding implied constraints that result from a `where` clause (though TODOs have been added). --------- Co-authored-by: Josh L <josh11b@users.noreply.github.com> Co-authored-by: Richard Smith <richard@metafoo.co.uk> Co-authored-by: Dana Jansens <danakj@orodu.net>