mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Removing Function and Param Description
- Removing FunctionDescription and ParamDescription. All the data should now be in the FunctionType - Plus using the FunctionTypePointer alias in a few places
This commit is contained in:
parent
e77fc5c7e0
commit
866bd01bef
@ -93,8 +93,8 @@ static ContractDefinition const* retrieveContract(ASTPointer<SourceUnit> _source
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::shared_ptr<FunctionType const> const& retrieveFunctionBySignature(ContractDefinition const* _contract,
|
static FunctionTypePointer const& retrieveFunctionBySignature(ContractDefinition const* _contract,
|
||||||
std::string const& _signature)
|
std::string const& _signature)
|
||||||
{
|
{
|
||||||
FixedHash<4> hash(dev::sha3(_signature));
|
FixedHash<4> hash(dev::sha3(_signature));
|
||||||
return _contract->getInterfaceFunctions()[hash];
|
return _contract->getInterfaceFunctions()[hash];
|
||||||
@ -643,7 +643,7 @@ BOOST_AUTO_TEST_CASE(state_variable_accessors)
|
|||||||
ContractDefinition const* contract;
|
ContractDefinition const* contract;
|
||||||
BOOST_CHECK_NO_THROW(source = parseTextAndResolveNamesWithChecks(text));
|
BOOST_CHECK_NO_THROW(source = parseTextAndResolveNamesWithChecks(text));
|
||||||
BOOST_REQUIRE((contract = retrieveContract(source, 0)) != nullptr);
|
BOOST_REQUIRE((contract = retrieveContract(source, 0)) != nullptr);
|
||||||
std::shared_ptr<FunctionType const> function = retrieveFunctionBySignature(contract, "foo()");
|
FunctionTypePointer function = retrieveFunctionBySignature(contract, "foo()");
|
||||||
BOOST_CHECK_MESSAGE(function->getDeclaration() != nullptr, "Could not find the accessor function");
|
BOOST_CHECK_MESSAGE(function->getDeclaration() != nullptr, "Could not find the accessor function");
|
||||||
auto returnParams = function->getReturnParameterTypeNames();
|
auto returnParams = function->getReturnParameterTypeNames();
|
||||||
BOOST_CHECK_EQUAL(returnParams.at(0), "uint256");
|
BOOST_CHECK_EQUAL(returnParams.at(0), "uint256");
|
||||||
|
Loading…
Reference in New Issue
Block a user