mirror of
https://github.com/ziglang/zig.git
synced 2026-02-01 20:23:38 +00:00
Sema: handle the_only_possible_value in beginComptimePtrMutation
This commit is contained in:
parent
019537cb2a
commit
4e1aa5d543
10
src/Sema.zig
10
src/Sema.zig
@ -20405,6 +20405,16 @@ fn beginComptimePtrMutation(
|
||||
.ty = elem_ty,
|
||||
},
|
||||
|
||||
.the_only_possible_value => {
|
||||
const duped = try sema.arena.create(Value);
|
||||
duped.* = Value.initTag(.the_only_possible_value);
|
||||
return ComptimePtrMutationKit{
|
||||
.decl_ref_mut = parent.decl_ref_mut,
|
||||
.val = duped,
|
||||
.ty = elem_ty,
|
||||
};
|
||||
},
|
||||
|
||||
else => unreachable,
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user