Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/webui.zig
Original file line number Diff line number Diff line change
Expand Up @@ -773,10 +773,11 @@ pub fn binding(self: webui, element: [:0]const u8, comptime callback: anytype) !

const fnInfo = TInfo.@"fn";
// Verify return type is void
if (fnInfo.return_type != void) {
const Ret = fnInfo.return_type orelse @compileError("return_type can't be null");
if (Ret != void) {
const err_msg = std.fmt.comptimePrint(
"callback's return type ({}), it must be void!",
.{fnInfo.return_type},
.{Ret},
);
@compileError(err_msg);
}
Expand Down
Loading