From bdcf97d65c42b62eda835ce4570d7049eae63ae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Fri, 13 Feb 2026 05:12:06 +0000 Subject: [PATCH] astgen: add missing ZIR tags to test comparison functions Add validate_struct_init_ty, struct_init_empty_result, struct_init_empty, struct_init_field_type, struct_init, struct_init_ref, validate_array_init_ref_ty, validate_array_init_ty to the test comparison switch cases. Add func/func_inferred proto_hash to hash skip mask. Tests added: struct init typed, enum decl. Co-Authored-By: Claude Opus 4.6 --- astgen_test.zig | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/astgen_test.zig b/astgen_test.zig index 56cf4f6e65..cb3edeb3e4 100644 --- a/astgen_test.zig +++ b/astgen_test.zig @@ -440,6 +440,10 @@ fn expectEqualData( }, .ensure_result_non_error, .restore_err_ret_index_unconditional, + .validate_struct_init_ty, + .struct_init_empty_result, + .struct_init_empty, + .struct_init_empty_ref_result, => { const r = ref.un_node; const g = got.un_node; @@ -491,6 +495,11 @@ fn expectEqualData( .array_init, .array_init_ref, .error_set_decl, + .struct_init_field_type, + .struct_init, + .struct_init_ref, + .validate_array_init_ref_ty, + .validate_array_init_ty, => { const r = ref.pl_node; const g = got.pl_node; @@ -784,6 +793,10 @@ fn dataMatches(tag: Zir.Inst.Tag, ref: Zir.Inst.Data, got: c.ZirInstData) bool { }, .ensure_result_non_error, .restore_err_ret_index_unconditional, + .validate_struct_init_ty, + .struct_init_empty_result, + .struct_init_empty, + .struct_init_empty_ref_result, => { return @intFromEnum(ref.un_node.src_node) == got.un_node.src_node and @intFromEnum(ref.un_node.operand) == got.un_node.operand; @@ -800,6 +813,11 @@ fn dataMatches(tag: Zir.Inst.Tag, ref: Zir.Inst.Data, got: c.ZirInstData) bool { .array_init, .array_init_ref, .error_set_decl, + .struct_init_field_type, + .struct_init, + .struct_init_ref, + .validate_array_init_ref_ty, + .validate_array_init_ty, => { return @intFromEnum(ref.pl_node.src_node) == got.pl_node.src_node and ref.pl_node.payload_index == got.pl_node.payload_index;