mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Call functions only if public/external
This commit is contained in:
parent
de6095098f
commit
c4b0103dee
@ -1182,7 +1182,7 @@ void SolContract::merge()
|
||||
if (holds_alternative<shared_ptr<SolContractFunction>>(f))
|
||||
{
|
||||
auto function = get<shared_ptr<SolContractFunction>>(f);
|
||||
if (function->implemented())
|
||||
if (function->implemented() && (function->visibility() == SolFunctionVisibility::EXTERNAL || function->visibility() == SolFunctionVisibility::PUBLIC))
|
||||
m_contractFunctionMap[name()].insert(pair(function->name(), function->returnValue()));
|
||||
}
|
||||
}
|
||||
@ -1336,4 +1336,4 @@ pair<string, string> SolLibrary::pseudoRandomTest()
|
||||
}
|
||||
solAssert(m_publicFunctionMap.count(chosenFunction), "Sol proto adaptor: Invalid library function chosen");
|
||||
return pair(chosenFunction, m_publicFunctionMap[chosenFunction]);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user