mirror of
https://github.com/ziglang/zig.git
synced 2026-11-22 04:37:39 -05:00
add compile error for ignoring return value
also introduce the _ identifier which you can assign to to discard a return value closes #219
This commit is contained in:
1 parent
3b40aaa01f
commit
a665872e88
10 files changed
+102
-53
No files matched your search
@@ -2928,6 +2928,7 @@ static LLVMValueRef gen_const_val(CodeGen *g, ConstExprValue *const_val) {
|
||||
render_const_val_global(g, const_val, "");
|
||||
switch (const_val->data.x_ptr.special) {
|
||||
case ConstPtrSpecialInvalid:
|
||||
case ConstPtrSpecialDiscard:
|
||||
zig_unreachable();
|
||||
case ConstPtrSpecialRef:
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user