Commit 4e1aa5d543

Veikka Tuominen <git@vexu.eu>
2022-06-03 14:25:53
Sema: handle the_only_possible_value in beginComptimePtrMutation
1 parent 019537c
Changed files (1)
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,
                     }
                 },