diff --git a/astgen.c b/astgen.c index d09aa09c64..288b2ac01c 100644 --- a/astgen.c +++ b/astgen.c @@ -2668,7 +2668,8 @@ static uint32_t tryResolvePrimitiveIdent(GenZir* gz, uint32_t node) { // Integer type detection: u29, i13, etc. (AstGen.zig:8304-8336). if (tok_len >= 2 && (source[tok_start] == 'u' || source[tok_start] == 'i')) { - uint8_t signedness = (source[tok_start] == 'i') ? 1 : 0; + // Zig Signedness enum: unsigned=1, signed=0 + uint8_t signedness = (source[tok_start] == 'u') ? 1 : 0; uint16_t bit_count = 0; bool valid = true; for (uint32_t k = tok_start + 1; k < tok_end; k++) { diff --git a/astgen_test.zig b/astgen_test.zig index 1cd940b43f..5592d1fc32 100644 --- a/astgen_test.zig +++ b/astgen_test.zig @@ -798,8 +798,8 @@ test "astgen: corpus tokenizer_test.zig" { } test "astgen: corpus parser_test.zig" { - // TODO: int_type signedness data mismatch at inst[6899] — all tags and - // inst_len match, but one int_type has ref=signed got=unsigned. + // TODO: 10+ extra data mismatches (ref=48 got=32, bit 4 = propagate_error_trace) + // in call instruction flags — ctx propagation differs from upstream. if (true) return error.SkipZigTest; const gpa = std.testing.allocator; try corpusCheck(gpa, @embedFile("parser_test.zig")); diff --git a/zir.h b/zir.h index 766d66938c..10950e1249 100644 --- a/zir.h +++ b/zir.h @@ -384,9 +384,9 @@ typedef union { } ptr_type; struct { int32_t src_node; + uint16_t bit_count; uint8_t signedness; uint8_t _pad; - uint16_t bit_count; } int_type; struct { int32_t src_node;