zig/doc/langref/test_invalid_defer.zig

10 lines
167 B
Zig

fn deferInvalidExample() !void {
defer {
return error.DeferError;
}
return error.DeferError;
}
// test_error=cannot return from defer expression