mirror of
https://github.com/ziglang/zig.git
synced 2026-02-08 07:27:18 +00:00
Sema: fix index type in AIR being u64 instead of usize
This commit is contained in:
parent
8e497eb32c
commit
abbcf40327
@ -10775,7 +10775,7 @@ fn zirArrayInit(
|
||||
const elem_ptr_ty_ref = try sema.addType(elem_ptr_ty);
|
||||
|
||||
for (resolved_args) |arg, i| {
|
||||
const index = try sema.addIntUnsigned(Type.u64, i);
|
||||
const index = try sema.addIntUnsigned(Type.usize, i);
|
||||
const elem_ptr = try block.addPtrElemPtrTypeRef(alloc, index, elem_ptr_ty_ref);
|
||||
_ = try block.addBinOp(.store, elem_ptr, arg);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user