Hi guys,
Have look at the following code
fn foo() void {
const item = struct {
fn format(_: @This(), _: ?*std.Io.Writer) void {}
};
const a = item{};
a.format(null); // A
std.debug.print("{f}\n", .{a}); // B
}
A is always ok , B will eventually call a.format but required that format is pub . What makes the difference?