diff --git a/src/buzz_api.zig b/src/buzz_api.zig index 4b25a729..077342ed 100644 --- a/src/buzz_api.zig +++ b/src/buzz_api.zig @@ -282,7 +282,7 @@ fn valueDump(value: Value, vm: *VM, seen: *std.AutoHashMap(*_obj.Obj, void), dep if (if (field.static) object.fields[field.index] - else if (!field.method) + else if (field.has_default) object.defaults[field.index] else null) |v| diff --git a/src/disassembler.zig b/src/disassembler.zig index 47b6f10d..4ee95bdf 100644 --- a/src/disassembler.zig +++ b/src/disassembler.zig @@ -596,7 +596,13 @@ pub const DumpState = struct { }, ) catch unreachable; - if (object.defaults[field.index]) |v| { + if (if (field.static) + object.fields[field.index] + else if (field.has_default) + object.defaults[field.index] + else + null) |v| + { out.print(" = ", .{}) catch unreachable; state.valueDump( v,