mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9567 from ethereum/fixInheritdoc
Require inheritdoc tag to be non-empty.
This commit is contained in:
commit
1cb04914d4
@ -313,6 +313,16 @@ void ReferencesResolver::resolveInheritDoc(StructuredDocumentation const& _docum
|
||||
case 1:
|
||||
{
|
||||
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;
|
||||
boost::split(path, name, boost::is_any_of("."));
|
||||
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