Fix bug in function output params

This commit is contained in:
Bhargava Shastry 2021-04-29 19:11:57 +02:00
parent ef29a5e287
commit 46bac2377f

View File

@ -287,10 +287,11 @@ string FunctionGenerator::visit()
<< state->currentFunctionState()->params(FunctionState::Params::INPUT)
<< " "
<< visibility
<< " pure"
<< " returns"
<< state->currentFunctionState()->params(FunctionState::Params::OUTPUT)
<< " {}\n";
<< " pure";
if (!state->currentFunctionState()->outputs.empty())
function << " returns"
<< state->currentFunctionState()->params(FunctionState::Params::OUTPUT);
function << " {}\n";
return function.str();
}