mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Complete error coverage of ReferenceResolver
This commit is contained in:
parent
8a6aa53791
commit
ffdb0e37ff
@ -231,15 +231,7 @@ void ReferencesResolver::operator()(yul::Identifier const& _identifier)
|
|||||||
string(".slot").size() :
|
string(".slot").size() :
|
||||||
string(".offset").size()
|
string(".offset").size()
|
||||||
));
|
));
|
||||||
if (realName.empty())
|
solAssert(!realName.empty(), "Empty name.");
|
||||||
{
|
|
||||||
m_errorReporter.declarationError(
|
|
||||||
4794_error,
|
|
||||||
_identifier.location,
|
|
||||||
"In variable names .slot and .offset can only be used as a suffix."
|
|
||||||
);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
declarations = m_resolver.nameFromCurrentScope(realName);
|
declarations = m_resolver.nameFromCurrentScope(realName);
|
||||||
if (!declarations.empty())
|
if (!declarations.empty())
|
||||||
// To support proper path resolution, we have to use pathFromCurrentScope.
|
// To support proper path resolution, we have to use pathFromCurrentScope.
|
||||||
|
@ -0,0 +1,9 @@
|
|||||||
|
contract B {}
|
||||||
|
|
||||||
|
contract C {
|
||||||
|
/// @inheritdoc B
|
||||||
|
/// @inheritdoc B
|
||||||
|
function f() internal {}
|
||||||
|
}
|
||||||
|
// ----
|
||||||
|
// DocstringParsingError 5142: (32-71): Documentation tag @inheritdoc can only be given once.
|
Loading…
Reference in New Issue
Block a user