Add a Core.Array class type, and make array refer to it. (#7892)

As described in proposal #4682, make `array(T, N)` be syntactic sugar
for the type `Core.Array` defined in the standard library. This provides
a home for impls that are specific to `Core.Array`.

Assisted-by: Gemini and Claude via Antigravity
This commit is contained in:
Richard Smith authored and GitHub committed 2026-10-06 17:23:49 +00:00
1 parent a50feb64ce
commit 947c1eb527
131 files changed
+9007 -8238

No files matched your search

+4
View File
@@ -613,6 +613,10 @@ auto ExportAllFieldsToCpp(Context& context,
auto ExportFieldToCpp(Context& context, SemIR::InstId field_inst_id,
SemIR::FieldDecl field_decl,
SemIR::SpecificId specific_id) -> clang::FieldDecl* {
if (field_decl.type_id == SemIR::ErrorInst::TypeId) {
return nullptr;
}
// Get the `SemIR::Class` that contains the `field_decl`.
auto unbound_element_type =
context.types().GetAs<SemIR::UnboundElementType>(field_decl.type_id);