mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Add basic caller-side support for default values in check (#7800)
Modifies the arity check to include a lower-bound for arguments. Adds logic to pattern matching to supply default arguments for missing parameters.
This commit is contained in:
@@ -2661,6 +2661,7 @@ static auto TryResolveTypedInst(ImportRefResolver& resolver,
|
||||
if (import_function.definition_id.has_value()) {
|
||||
new_function.definition_id = new_function.first_owning_decl_id;
|
||||
}
|
||||
new_function.default_value_arity = import_function.default_value_arity;
|
||||
|
||||
switch (import_function.special_function_kind) {
|
||||
case SemIR::Function::SpecialFunctionKind::CppThunk:
|
||||
|
||||
Reference in New Issue
Block a user