mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Remove linking to unqualified library name
- SemanticTests accepts fully qualified library name and also unqualifed library name when the library is defined in the same file for convenience. - commandline tests are added! Signed-off-by: soroosh-sdi <soroosh.sardari@gmail.com>
This commit is contained in:
@@ -73,14 +73,6 @@ LinkerObject::matchLibrary(
|
||||
)
|
||||
{
|
||||
auto it = _libraryAddresses.find(_linkRefName);
|
||||
if (it != _libraryAddresses.end())
|
||||
return &it->second;
|
||||
// If the user did not supply a fully qualified library name,
|
||||
// try to match only the simple library name
|
||||
size_t colon = _linkRefName.find(':');
|
||||
if (colon == string::npos)
|
||||
return nullptr;
|
||||
it = _libraryAddresses.find(_linkRefName.substr(colon + 1));
|
||||
if (it != _libraryAddresses.end())
|
||||
return &it->second;
|
||||
return nullptr;
|
||||
|
||||
Reference in New Issue
Block a user