Remove incorrect CHECK that would fail for out-of-line template declarations. (#7772)

Add a test, which fails for now, but will eventually demonstrate why
this CHECK was incorrect.
This commit is contained in:
Richard Smith
2026-09-11 16:58:05 +00:00
committed by GitHub
parent b1e9ced0c9
commit 7d70f72bec
2 changed files with 512 additions and 3 deletions
-3
View File
@@ -334,9 +334,6 @@ auto AttachDependentInstToCurrentGeneric(Context& context,
// declaration in this case instead of attempting to attach the new
// declaration to a generic region that we're no longer within.
if (context.generic_region_stack().Empty()) {
// This should only happen for `*Decl` instructions, never for template
// actions.
CARBON_CHECK(!dep_kind.HasAnyOf(DependentInstKind::Template));
return;
}