aboutsummaryrefslogtreecommitdiff
path: root/bootstrap
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap')
-rw-r--r--bootstrap/parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bootstrap/parse.c b/bootstrap/parse.c
index 874b54d..197b61b 100644
--- a/bootstrap/parse.c
+++ b/bootstrap/parse.c
@@ -2378,7 +2378,7 @@ parsestmt(stmt_yielder_t yield, void *yarg, struct parser *P) {
P->targty = P->curfn->retty;
st.retex = exprdup(parseexpr(P));
lexexpect(P, ';');
- if (!typematchestarg(st.retex->ty, P->curfn->retty))
+ if (!typematchestarg(P->curfn->retty, st.retex->ty))
fatal(P, st.retex->span,
"incompatible type in return statement (%t, expected %t)",
st.retex->ty, P->curfn->retty);