From 2716b5ff83bb08fd93b417e61463782bb8d1e97d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20=C5=9Aliwak?= Date: Tue, 26 May 2020 12:28:46 +0200 Subject: [PATCH] Replace conditionally empty whiskers variables for punctuation with syntax in IRGenerator::generateInternalDispatchFunctions() --- libsolidity/codegen/ir/IRGenerationContext.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/libsolidity/codegen/ir/IRGenerationContext.cpp b/libsolidity/codegen/ir/IRGenerationContext.cpp index 3fa403272..493ed7b53 100644 --- a/libsolidity/codegen/ir/IRGenerationContext.cpp +++ b/libsolidity/codegen/ir/IRGenerationContext.cpp @@ -126,22 +126,19 @@ string IRGenerationContext::generateInternalDispatchFunction(YulArity const& _ar string funName = IRNames::internalDispatch(_arity); return m_functions.createFunction(funName, [&]() { Whiskers templ(R"( - function (fun ) { + function (fun, ) -> { switch fun <#cases> case { - () + := () } default { invalid() } } )"); templ("functionName", funName); - templ("comma", _arity.in > 0 ? "," : ""); templ("in", suffixedVariableNameList("in_", 0, _arity.in)); - templ("arrow", _arity.out > 0 ? "->" : ""); - templ("assignment_op", _arity.out > 0 ? ":=" : ""); templ("out", suffixedVariableNameList("out_", 0, _arity.out)); vector> cases;