air: compare and print nested types without recursion

This commit is contained in:
dev committed 2026-10-09 20:09:00 +03:00
1 parent d0fcc3d473
commit 53030efcea
7 files changed
+180 -67

No files matched your search

+1 -1
View File
@@ -181,7 +181,7 @@ fn runSource(arena: std.mem.Allocator, io: std.Io, dir: std.Io.Dir, rel: []const
const parsed = try aji.air.parse.parse(arena, path, lowered.air);
if (parsed.module) |m| {
var w: std.Io.Writer.Allocating = .init(arena);
try aji.air.print.print(m, &w.writer);
try aji.air.print.print(arena, m, &w.writer);
if (!std.mem.eql(u8, w.written(), lowered.air)) return .{ .outcome = .fail, .detail = "lowered AIR is not canonical (parse → print differs)" };
}
const golden_path = try std.fmt.allocPrint(arena, "{s}.expected", .{rel});