mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-04 19:01:05 +01:00
Initial support for return forms (#6556)
The main changes here are: - Introducing `InitForm` and `RefForm` to represent initializing and reference forms (the two return forms currently supported by the parser). - Introducing the `FormType` singleton inst to represent their type (i.e. `Core.Form`). - Emitting an inst representing a function's declared return form as part of handling the function signature. The return form inst is currently ignored. Subsequent PRs will expose it in `SemIR::Function` and use it to determine the form of call expressions.
This commit is contained in:
@@ -139,8 +139,6 @@ auto CheckFunctionDefinitionSignature(Context& context,
|
||||
if (function.return_type_inst_id.has_value()) {
|
||||
CheckFunctionReturnType(context, SemIR::LocId(function.return_type_inst_id),
|
||||
function, SemIR::SpecificId::None);
|
||||
// Don't re-check the return type below.
|
||||
params_to_complete.consume_back();
|
||||
}
|
||||
|
||||
// Check the parameter types are complete.
|
||||
|
||||
Reference in New Issue
Block a user