From fcf53b31fc2899cba682c4c9a8cade40c6e0ab9e Mon Sep 17 00:00:00 2001 From: kristopher tate Date: Sat, 28 Jul 2018 15:38:22 +0900 Subject: src/ir.cpp: return promise->T instead of promise; Tracking Issue #1296 ; Thanks @andrewrk ; --- src/ir.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index 1e9d1bdb7e..9712cb0bc2 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -19033,8 +19033,9 @@ static TypeTableEntry *ir_analyze_instruction_frame_address(IrAnalyze *ira, IrIn static TypeTableEntry *ir_analyze_instruction_handle(IrAnalyze *ira, IrInstructionHandle *instruction) { ir_build_handle_from(&ira->new_irb, &instruction->base); - TypeTableEntry *promise_type = get_promise_type(ira->codegen, nullptr); - return promise_type; + FnTableEntry *fn_entry = exec_fn_entry(ira->new_irb.exec); + assert(fn_entry != nullptr); + return get_promise_type(ira->codegen, fn_entry->type_entry->data.fn.fn_type_id.return_type); } static TypeTableEntry *ir_analyze_instruction_align_of(IrAnalyze *ira, IrInstructionAlignOf *instruction) { -- cgit v1.2.3