Restore disabled CHECK in pattern handling. (#5410)

I believe this was unblocked by #5320, but it was overlooked at that
time.
This commit is contained in:
Geoff Romer
2025-05-02 18:08:43 +00:00
committed by GitHub
parent 6469f67b14
commit 34a9e24920
+1 -3
View File
@@ -40,9 +40,7 @@ auto EndSubpatternAsNonExpr(Context& context) -> void {
auto block_id = context.inst_block_stack().Pop();
CARBON_CHECK(block_id == context.region_stack().PeekRegion().back());
CARBON_CHECK(context.region_stack().PeekRegion().size() == 1);
// TODO: Add `CARBON_CHECK(inst_blocks().Get(block_id).empty())`.
// Currently that can fail when ending a tuple pattern in a name binding
// decl in a class or interface.
CARBON_CHECK(context.inst_blocks().Get(block_id).empty());
context.region_stack().PopAndDiscardRegion();
}