0

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 {
4

1 に答える 1