Sema: validate @intToEnum int operand type
This commit is contained in:
12
test/cases/compile_errors/discarding_error_value.zig
Normal file
12
test/cases/compile_errors/discarding_error_value.zig
Normal file
@@ -0,0 +1,12 @@
|
||||
export fn entry() void {
|
||||
_ = foo();
|
||||
}
|
||||
fn foo() !void {
|
||||
return error.OutOfMemory;
|
||||
}
|
||||
|
||||
// error
|
||||
// backend=stage2
|
||||
// target=native
|
||||
//
|
||||
// :2:12: error: error is discarded. consider using `try`, `catch`, or `if`
|
||||
Reference in New Issue
Block a user