Reconcile function default values between decl and def (#7665)

Updates the pattern matching code to support unspecified default values.
Adds logic to decl and def merge code to diagnose mismatches in defaults
if specified in both places, or if let entirely unspecified.

Per https://github.com/carbon-language/carbon-lang/pull/7521.
This commit is contained in:
Lucile Rose Nihlen
2026-09-08 20:41:58 +00:00
committed by GitHub
parent 5a07a14fe9
commit ca9e985fa8
30 changed files with 4624 additions and 3875 deletions
+2 -1
View File
@@ -829,7 +829,8 @@ template <typename InstT>
SemIR::GenericNamedConstraintType, SemIR::InstType,
SemIR::IntLiteralType, SemIR::NamespaceType,
SemIR::RequireSpecificDefinitionType, SemIR::SpecificFunctionType,
SemIR::UnboundElementType, SemIR::WhereExpr, SemIR::WitnessType>())
SemIR::UnboundElementType, SemIR::UnspecifiedValueType,
SemIR::WhereExpr, SemIR::WitnessType>())
static auto BuildTypeForInst(FileContext& context, InstT /*inst*/)
-> LoweredTypes {
// Return an empty struct as a placeholder.