mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Bug that ignored return tag when no other devdoc tags were present
This commit is contained in:
@@ -99,16 +99,14 @@ Json::Value Natspec::devDocumentation(ContractDefinition const& _contractDef)
|
||||
if (auto fun = dynamic_cast<FunctionDefinition const*>(&it.second->declaration()))
|
||||
{
|
||||
Json::Value method(devDocumentation(fun->annotation().docTags));
|
||||
// add the function, only if we have any documentation to add
|
||||
Json::Value jsonReturn = extractReturnParameterDocs(fun->annotation().docTags, *fun);
|
||||
|
||||
if (!jsonReturn.empty())
|
||||
method["returns"] = jsonReturn;
|
||||
|
||||
if (!method.empty())
|
||||
{
|
||||
// add the function, only if we have any documentation to add
|
||||
Json::Value jsonReturn = extractReturnParameterDocs(fun->annotation().docTags, *fun);
|
||||
|
||||
if (!jsonReturn.empty())
|
||||
method["returns"] = jsonReturn;
|
||||
|
||||
methods[it.second->externalSignature()] = method;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user