mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #9530 from a3d4/improve-error-coverage-referenceresolver
Complete error coverage of ReferenceResolver
This commit is contained in:
commit
73506e2858
@ -231,15 +231,7 @@ void ReferencesResolver::operator()(yul::Identifier const& _identifier)
|
||||
string(".slot").size() :
|
||||
string(".offset").size()
|
||||
));
|
||||
if (realName.empty())
|
||||
{
|
||||
m_errorReporter.declarationError(
|
||||
4794_error,
|
||||
_identifier.location,
|
||||
"In variable names .slot and .offset can only be used as a suffix."
|
||||
);
|
||||
return;
|
||||
}
|
||||
solAssert(!realName.empty(), "Empty name.");
|
||||
declarations = m_resolver.nameFromCurrentScope(realName);
|
||||
if (!declarations.empty())
|
||||
// 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