diff --git a/src/ir/type_bridge.zig b/src/ir/type_bridge.zig index 8dba6b2..91254d0 100644 --- a/src/ir/type_bridge.zig +++ b/src/ir/type_bridge.zig @@ -50,8 +50,12 @@ pub fn resolveAstType(node: ?*const Node, table: *TypeTable) TypeId { .struct_decl => |sd| resolveInlineStruct(&sd, table), .union_decl => |ud| resolveInlineUnion(&ud, table), else => { - std.debug.print("type_bridge: unhandled node type {s}\n", .{@tagName(n.data)}); - return .s64; + // A non-type AST node reached type resolution — a caller bug. + // Returning a plausible `.s64` would silently fabricate an 8-byte + // int; return the `.unresolved` sentinel so it surfaces (and trips + // the sizeOf/toLLVMType panic if it ever reaches codegen). + std.debug.print("type_bridge: unhandled node type {s} in type position — returning .unresolved\n", .{@tagName(n.data)}); + return .unresolved; }, }; }