From 007b1e966d4234f2fbdc8f21d53b27dec0060b5e Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Tue, 16 Aug 2022 23:37:40 +0100 Subject: Unexpected return error --- src/Compiler.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Compiler.hs') diff --git a/src/Compiler.hs b/src/Compiler.hs index da25c5d..413a041 100644 --- a/src/Compiler.hs +++ b/src/Compiler.hs @@ -121,7 +121,7 @@ compile x = do (A.Return value pos) -> do (ev, errs) <- get case getSyml ev "$fn$" of - Nothing -> addError $ Error "return without function call" pos + Nothing -> addError $ UnexpectedReturn "return without function call" pos Just (_, A.FuncType _ rtyp, _) -> do r <- typecheckReturn value rtyp case r of -- cgit v1.2.3