mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 06:54:44 +01:00
Completing a type no longer ignores facet types (#5004)
Make facet types complete like other types. This means that in the body of an interface, the type of `Self` is incomplete. This involved fixing an issue where eval of a specific_id that was already canonical was not resolving the specific declaration, which could occur as part of substituting into a facet type. --------- 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>
This commit is contained in:
co-authored by
Josh L
Richard Smith
Dana Jansens
parent
1d48270dc4
commit
3ebd098597
@@ -21,8 +21,6 @@ namespace Carbon::Check {
|
||||
|
||||
static auto MakeSelfSpecificId(Context& context, SemIR::GenericId generic_id)
|
||||
-> SemIR::SpecificId;
|
||||
static auto ResolveSpecificDeclaration(Context& context, SemIRLoc loc,
|
||||
SemIR::SpecificId specific_id) -> void;
|
||||
|
||||
auto StartGenericDecl(Context& context) -> void {
|
||||
context.generic_region_stack().Push();
|
||||
@@ -414,8 +412,8 @@ auto FinishGenericDefinition(Context& context, SemIR::GenericId generic_id)
|
||||
context.generic_region_stack().Pop();
|
||||
}
|
||||
|
||||
static auto ResolveSpecificDeclaration(Context& context, SemIRLoc loc,
|
||||
SemIR::SpecificId specific_id) -> void {
|
||||
auto ResolveSpecificDeclaration(Context& context, SemIRLoc loc,
|
||||
SemIR::SpecificId specific_id) -> void {
|
||||
// If this is the first time we've formed this specific, evaluate its decl
|
||||
// block to form information about the specific.
|
||||
if (!context.specifics().Get(specific_id).decl_block_id.has_value()) {
|
||||
|
||||
Reference in New Issue
Block a user