From dd4536a8b0dbb770ee1e9e7e492a75157ba0f8e6 Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 13 Aug 2022 11:04:37 +0200 Subject: retty --- bootstrap/parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bootstrap') 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); -- cgit v1.2.3