mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Require inheritdoc tag to be non-empty.
This commit is contained in:
parent
f079efe28c
commit
0ea5aae9aa
@ -313,6 +313,16 @@ void ReferencesResolver::resolveInheritDoc(StructuredDocumentation const& _docum
|
|||||||
case 1:
|
case 1:
|
||||||
{
|
{
|
||||||
string const& name = _annotation.docTags.find("inheritdoc")->second.content;
|
string const& name = _annotation.docTags.find("inheritdoc")->second.content;
|
||||||
|
if (name.empty())
|
||||||
|
{
|
||||||
|
m_errorReporter.docstringParsingError(
|
||||||
|
1933_error,
|
||||||
|
_documentation.location(),
|
||||||
|
"Expected contract name following documentation tag @inheritdoc."
|
||||||
|
);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
vector<string> path;
|
vector<string> path;
|
||||||
boost::split(path, name, boost::is_any_of("."));
|
boost::split(path, name, boost::is_any_of("."));
|
||||||
Declaration const* result = m_resolver.pathFromCurrentScope(path);
|
Declaration const* result = m_resolver.pathFromCurrentScope(path);
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
contract C {
|
||||||
|
/// @inheritdoc
|
||||||
|
function f() internal {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// DocstringParsingError 1933: (17-32): Expected contract name following documentation tag @inheritdoc.
|
Loading…
Reference in New Issue
Block a user