harec

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 8f49e56a9fabf7baea71baa5f4d6018f7e9a00ee
parent 53965de78675b1b477d032c617f36422aebf91d3
Author: Drew DeVault <sir@cmpwn.com>
Date:   Mon,  1 Feb 2021 17:26:20 -0500

check: if terminates when all branches terminate

Diffstat:
Msrc/check.c | 1+
1 file changed, 1 insertion(+), 0 deletions(-)

diff --git a/src/check.c b/src/check.c @@ -869,6 +869,7 @@ check_expr_if(struct context *ctx, false_branch, NULL); if (true_branch->terminates && false_branch->terminates) { + expr->terminates = true; expr->result = &builtin_type_void; } else if (true_branch->terminates) { expr->result = false_branch->result;