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:
Geoff Romer
2025-04-28 16:54:37 +00:00
committed by GitHub
parent 84384cf126
commit fafb655d39
565 changed files with 11956 additions and 8095 deletions
+2 -1
View File
@@ -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