#zig build-obj {
--name test -fno-emit-bin
-Mroot=test.zig
#}

#write test.zig {
// zig fmt: off
comptime { _ = @min(0, u32); } // type
comptime { _ = @max(0, {}); } // void
comptime { _ = @min(0, false); } // boolean
comptime { _ = @min(0, &@as(u8, 0)); } // pointer
comptime { _ = @max(0, [0]u8{}); } // array
comptime { _ = @min(0, Struct{}); } // struct
comptime { _ = @max(0, null); } // null
comptime { _ = @min(0, @as(?u8, 0)); } // nullable
comptime { _ = @max(0, @as(error{}!u8, 0)); } // error union
comptime { _ = @min(0, error.Foo); } // error set
comptime { _ = @max(0, Enum.foo); } // enum
comptime { _ = @min(0, Union{ .foo = {} }); } // union
comptime { _ = @max(0, struct { fn func() u8 { return 42; }}.func); }
comptime { _ = @max(0, .foo); } // enum literal
// zig fmt: on

const Struct = struct {};
const Enum = enum { foo };
const Union = union { foo: void };
#}
#update
#check errors {
test.zig:2:24: error: expected number, found 'type'
test.zig:3:24: error: expected number, found 'void'
test.zig:4:24: error: expected number, found 'bool'
test.zig:5:24: error: expected number, found '*const u8'
test.zig:6:29: error: expected number, found '[0]u8'
test.zig:7:30: error: expected number, found 'test.Struct'
test.zig:18:16: note: struct declared here
test.zig:8:24: error: expected number, found '@TypeOf(null)'
test.zig:9:24: error: expected number, found '?u8'
test.zig:10:24: error: expected number, found 'error{}!u8'
test.zig:11:24: error: expected number, found 'error{Foo}'
test.zig:12:28: error: expected number, found 'test.Enum'
test.zig:19:14: note: enum declared here
test.zig:13:29: error: expected number, found 'test.Union'
test.zig:20:15: note: union declared here
test.zig:14:61: error: expected number, found 'fn () u8'
test.zig:15:25: error: expected number, found '@EnumLiteral()'
#}
