mirror of
https://github.com/ziglang/zig.git
synced 2026-11-24 21:43:40 -05:00
blocks check that their statements are void
closes #291 This changes the error message "return value ignored" to "expression value is ignored". This is because this error also applies to {1;}, which has no function calls. Also fix ignored expression values in std and test. This caught a bug in debug.readAllocBytes where an early Eof error would have been missed. See #219.
This commit is contained in:
1 parent
6de33ded81
commit
c6605cba83
11 files changed
+80
-22
No files matched your search
@@ -2885,6 +2885,7 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable,
|
||||
case IrInstructionIdTestComptime:
|
||||
case IrInstructionIdGeneratedCode:
|
||||
case IrInstructionIdCheckSwitchProngs:
|
||||
case IrInstructionIdCheckStatementIsVoid:
|
||||
case IrInstructionIdTestType:
|
||||
case IrInstructionIdTypeName:
|
||||
case IrInstructionIdCanImplicitCast:
|
||||
|
||||
Reference in new issue
Block a user