Better diagnostic message in CHECK (#5504)

This commit is contained in:
Geoff Romer
2025-05-20 16:38:08 +00:00
committed by GitHub
parent c39efe321e
commit 515eb6b45b
+2 -1
View File
@@ -303,7 +303,8 @@ auto MatchContext::DoEmitPatternMatch(Context& context,
break;
}
case MatchKind::Callee: {
CARBON_CHECK(!param_pattern.index.has_value());
CARBON_CHECK(!param_pattern.index.has_value(),
"ValueParamPattern index set before callee pattern match");
param_pattern.index = NextRuntimeIndex();
ReplaceInstBeforeConstantUse(context, entry.pattern_id, param_pattern);
auto param_id = AddInst<SemIR::ValueParam>(