untitled paste

unlisted ⁨1⁩ ⁨file⁩ 2020-12-09 03:44:16 UTC

pastefile1

Raw
const Block = struct {
    instructions: [size]Instruction,
    final: ?u7,
    next: atomic.Int(?*Block),

    pub const size = 64;
};

Error msg: 
./src/main.zig:20:15: error: struct 'Block' depends on itself
const Block = struct {
              ^
./src/main.zig:23:22: note: referenced here
    next: atomic.Int(?*Block),
                     ^
./src/main.zig:23:21: note: referenced here
    next: atomic.Int(?*Block),
                    ^
./src/main.zig:43:37: note: referenced here
    var current_block: Block = Block{
                                    ^