Support array types with dependent bounds. (#4751)

Given `N:! i32`, the type `[T; N]` is a valid but dependent array type.
This commit is contained in:
Richard Smith authored and GitHub committed 2025-01-09 22:46:22 +00:00
1 parent 3a6fd0306e
commit d31fc9ad02
12 files changed
+816 -469

No files matched your search

+1 -1
View File
@@ -452,7 +452,7 @@ static auto BuildTypeForInst(FileContext& context, SemIR::ArrayType inst)
-> llvm::Type* {
return llvm::ArrayType::get(
context.GetType(inst.element_type_id),
context.sem_ir().GetArrayBoundValue(inst.bound_id));
*context.sem_ir().GetArrayBoundValue(inst.bound_id));
}
static auto BuildTypeForInst(FileContext& /*context*/, SemIR::AutoType inst)