From ac7971122dc32f59d82430285e7eaefe5d0d4301 Mon Sep 17 00:00:00 2001 From: Josh Wolfe Date: Sun, 23 Apr 2017 21:49:42 -0700 Subject: fix check-statement-is-void. add tests see #291 --- src/ir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index 36d44d14d5..2527fdd803 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -12666,7 +12666,7 @@ static TypeTableEntry *ir_analyze_instruction_check_switch_prongs(IrAnalyze *ira static TypeTableEntry *ir_analyze_instruction_check_statement_is_void(IrAnalyze *ira, IrInstructionCheckStatementIsVoid *instruction) { - IrInstruction *statement_value = instruction->statement_value; + IrInstruction *statement_value = instruction->statement_value->other; TypeTableEntry *statement_type = statement_value->value.type; if (type_is_invalid(statement_type)) return ira->codegen->builtin_types.entry_invalid; -- cgit v1.2.3