From 57b09b2ffbd1021d29e43fdc1f27da43f1b4ed23 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Wed, 10 Jun 2020 15:37:50 +0100 Subject: Fix #439 --- src/ir_print.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ir_print.cpp') diff --git a/src/ir_print.cpp b/src/ir_print.cpp index 9a7b1e113..fb09ad471 100644 --- a/src/ir_print.cpp +++ b/src/ir_print.cpp @@ -1294,7 +1294,7 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type * } case ExactValue_Procedure: { irValue **found = nullptr; - Ast *expr = value.value_procedure; + Ast *expr = unparen_expr(value.value_procedure); GB_ASSERT(expr != nullptr); if (expr->kind == Ast_ProcLit) { @@ -1304,7 +1304,7 @@ void ir_print_exact_value(irFileBuffer *f, irModule *m, ExactValue value, Type * GB_ASSERT(e != nullptr); found = map_get(&m->values, hash_entity(e)); } - GB_ASSERT(found != nullptr); + GB_ASSERT_MSG(found != nullptr, "%s", expr_to_string(expr)); irValue *val = *found; ir_print_value(f, m, val, type); break; -- cgit v1.2.3