[qfcc] Check returned type instead of expr type

Block expressions hide ex_error, but get_type() always returns null when
it finds one (which it does by recursing into block expression), so just
check the type itself.
This commit is contained in:
Bill Currie 2021-01-04 14:54:04 +09:00
parent 5b842da394
commit 0426879bf6

View file

@ -2075,7 +2075,7 @@ return_expr (function_t *f, expr_t *e)
t = get_type (e);
if (e->type == ex_error) {
if (!t) {
return e;
}
if (is_void(ret_type)) {