In 0.17 Type{…} syntax to initialize is dropped.
I have many functions lying around that take in void as an argument:

fn foo(_: void) void {}

These usually happen in functions that take in comptime stuff.
The following ways don’t work:

foo(void{}); // Error
foo(.{}); // Error

Instead the only way I found is this:

foo(undefined); // Works, but I hate looking at it
const VOID: void = undefined; //Maybe better
foo(VOID);

Is there a way to initialize void that’s not undefined?

Another use case is either type:

const A: if(myBool) void else T = .{}; // doesn't work

mlugg July 28, 2026, 10:45pm 3

T{ ... } syntax in general isn’t gone yet (though it will be going away), it’s just void{}, because that one was always a weird special case in the language. The canonical way to write a void value is just {} (no dot).

Didn’t know about that one!
What about the either type use case? Do I have to do
const T = if (@TypeOf(T) == void) {} else .{}; for default initialization now?

I ended up replacing void with struct{} in my codebase.