我正在尝试在 zig 中使用 JSON,但我不明白为什么它不能编译:
const file = std.fs.cwd().createFile("Hello", .{.read = true}) catch unreachable;
const stream = std.json.writeStream(std.fs.File.Writer, 5000000);
_ = stream;
错误:
error: parameter of type 'type' must be declared comptime
pub fn init(stream: OutStream) Self {