aboutsummaryrefslogtreecommitdiff
path: root/stmt.c
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2019-03-13 12:25:35 -0700
committerMichael Forney <mforney@mforney.org>2019-03-13 12:25:35 -0700
commit74b43a9973a22c95411137721775c11d58665660 (patch)
tree1f7c953bcb28a8dc9ee05772ab2f6c6979d17be6 /stmt.c
parent1df176029efa0d1e971e8835178f254ab8881592 (diff)
Make `struct function` opaque
Diffstat (limited to 'stmt.c')
-rw-r--r--stmt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/stmt.c b/stmt.c
index e642353..d732c31 100644
--- a/stmt.c
+++ b/stmt.c
@@ -275,8 +275,9 @@ stmt(struct function *f, struct scope *s)
break;
case TRETURN:
next();
- if (f->type->base != &typevoid) {
- e = exprconvert(expr(s), f->type->base);
+ t = functype(f);
+ if (t->base != &typevoid) {
+ e = exprconvert(expr(s), t->base);
v = funcexpr(f, e);
delexpr(e);
} else {