mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-23 19:42:45 +00:00
Require all impls constraints in impl as to be satisfied (#7531)
We checked that requirements inside the impl-as target interface were satisfied. But we also need to check that requirements coming from the constraint facet type, or named constraints that it targets, are satisfied.
This commit is contained in:
1 parent
2e61685658
commit
63757d281e
9 files changed
+375
-133
No files matched your search
@@ -421,8 +421,6 @@ auto HandleParseNode(Context& context, Parse::ImplDefinitionStartId node_id)
|
||||
auto [impl_id, impl_decl_id] = BuildImplDecl(context, node_id, true);
|
||||
auto& impl = context.impls().Get(impl_id);
|
||||
|
||||
CheckRequireDeclsSatisfied(context, node_id, impl);
|
||||
|
||||
impl.scope_id =
|
||||
context.name_scopes().Add(impl_decl_id, SemIR::NameId::None,
|
||||
context.decl_name_stack().PeekParentScopeId());
|
||||
@@ -434,6 +432,7 @@ auto HandleParseNode(Context& context, Parse::ImplDefinitionStartId node_id)
|
||||
context.generics().GetSelfSpecific(impl.generic_id));
|
||||
StartGenericDefinition(context, impl.generic_id);
|
||||
ImplWitnessStartDefinition(context, impl);
|
||||
CheckRequireDeclsSatisfied(context, node_id, impl);
|
||||
context.inst_block_stack().Push();
|
||||
context.node_stack().Push(node_id, impl_id);
|
||||
|
||||
|
||||
Reference in new issue
Block a user