From 4b5190008592d8ede6600947f7ce761a467ac499 Mon Sep 17 00:00:00 2001 From: Daniel Britten Date: Fri, 20 Sep 2024 02:59:15 +0000 Subject: [PATCH] Fix extra `}` generated when `ret ++ fargs` is empty Add missing `$` --- vc/src/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vc/src/Main.hs b/vc/src/Main.hs index 6c76fef..e33cf2f 100644 --- a/vc/src/Main.hs +++ b/vc/src/Main.hs @@ -259,7 +259,7 @@ fillInFunction topLevelContract file imports (FuncDef _ contract fargs ret body) funcArgs = generateGuarded (null fargs) $ "(" ++ unwords fargs ++ " : Literal)" opens = opensOfImports topLevelContract imports retVals = generateGuarded (null ret) $ "(" ++ unwords ret ++ " : Identifier)" - rValsAndArgs = generateGuarded (null (ret ++ fargs)) "{" ++ unwords ret ++ " " ++ argsSepSpace ++ "}" + rValsAndArgs = generateGuarded (null (ret ++ fargs)) $ "{" ++ unwords ret ++ " " ++ argsSepSpace ++ "}" replaceIn ttype = replaceMany [ ("\\", leanImports ++ internalImports topLevelContract contract file ttype),