mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Separate pattern types from expression types (#5360)
This is a step toward treating patterns as compile-time constants, so that we can import them more easily.
This commit is contained in:
@@ -95,7 +95,8 @@ auto Function::GetDeclaredReturnType(const File& file,
|
||||
if (!return_slot_pattern_id.has_value()) {
|
||||
return TypeId::None;
|
||||
}
|
||||
return GetTypeOfInstInSpecific(file, specific_id, return_slot_pattern_id);
|
||||
return ExtractScrutineeType(
|
||||
file, GetTypeOfInstInSpecific(file, specific_id, return_slot_pattern_id));
|
||||
}
|
||||
|
||||
} // namespace Carbon::SemIR
|
||||
|
||||
Reference in New Issue
Block a user