zig/doc/langref/test_invalid_defer.zig

10 lines
167 B
Zig
Raw Normal View History

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