mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add `staticcall to address`.
This commit is contained in:
committed by
chriseth
parent
2ed793c4d3
commit
7ca0aaaf6f
@@ -433,6 +433,22 @@ BOOST_AUTO_TEST_CASE(getter_is_memory_type)
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(address_staticcall)
|
||||
{
|
||||
char const* sourceCode = R"(
|
||||
contract C {
|
||||
function f() public view returns(bool) {
|
||||
return address(0x4242).staticcall("");
|
||||
}
|
||||
}
|
||||
)";
|
||||
|
||||
if (dev::test::Options::get().evmVersion().hasStaticCall())
|
||||
CHECK_SUCCESS_NO_WARNINGS(sourceCode);
|
||||
else
|
||||
CHECK_ERROR(sourceCode, TypeError, "\"staticcall\" is not supported by the VM version.");
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_SUITE_END()
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user