This could be wanted behaviour, it could not be, so I’m here for answers.
Also, is it something you think would be useful to the language?
Or something bad?
Edit: To clarify I’ll add example code
pub fn main() void {
return void;
}
src/main.zig:4:12: error: expected type 'void', found 'type'
return void;
void is a type. Values of type void do not have content. The type of void is type. The only “instance” of void is {}. You can do return {}; if you want to return from a function which returns void. But void is not an instance of void. You can only return void; if you want to return a type.