Sema: validate @intToEnum int operand type

This commit is contained in:
Veikka Tuominen
2022-06-30 17:38:04 +03:00
parent ae7b32eb62
commit e6ebf56dd6
6 changed files with 16 additions and 15 deletions

View 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`