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 authored and GitHub committed 2025-04-28 16:54:37 +00:00
1 parent 84384cf126
commit fafb655d39
565 files changed
+11956 -8095

No files matched your search

+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