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
2025-01-09 22:46:22 +00:00
committed by GitHub
parent 3a6fd0306e
commit d31fc9ad02
12 changed files with 816 additions and 469 deletions
+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)