const CustomError = error{
SomeError,
};
pub fn foo() !bool {
return CustomError.SomeError;
}
pub fn main() !void {
const val: bool = foo() catch |e| {
std.log.debug("{}", .{e});
return false;
};
std.log.debug("Final: {}", .{val});
}
This code fails to compile. The return statement tries to return from the main.
