Merge pull request #8806 from ethereum/natspec-constructor

[BREAKING] Natspec constructor and functions have consistent userdoc
This commit is contained in:
Harikrishnan Mulackal
2020-05-05 15:47:34 +05:30
committed by GitHub
3 changed files with 17 additions and 9 deletions
+5 -1
View File
@@ -42,8 +42,12 @@ Json::Value Natspec::userDocumentation(ContractDefinition const& _contractDef)
{
string value = extractDoc(constructorDefinition->annotation().docTags, "notice");
if (!value.empty())
{
// add the constructor, only if we have any documentation to add
methods["constructor"] = Json::Value(value);
Json::Value user;
user["notice"] = Json::Value(value);
methods["constructor"] = user;
}
}
string notice = extractDoc(_contractDef.annotation().docTags, "notice");