Sema: fix crash compiling an evented compiler

This commit is contained in:
Jacob Young 2026-01-08 10:31:07 -05:00
parent 2961cf1dac
commit b48599c549

View file

@ -23090,6 +23090,7 @@ fn checkAtomicPtrOperand(
) CompileError!Air.Inst.Ref {
const pt = sema.pt;
const zcu = pt.zcu;
try elem_ty.resolveLayout(pt);
var diag: Zcu.AtomicPtrAlignmentDiagnostics = .{};
const alignment = zcu.atomicPtrAlignment(elem_ty, &diag) catch |err| switch (err) {
error.OutOfMemory => return error.OutOfMemory,