Add `staticcall to address`.

This commit is contained in:
Daniel Kirchner
2018-08-15 16:06:48 +02:00
committed by chriseth
parent 2ed793c4d3
commit 7ca0aaaf6f
8 changed files with 116 additions and 9 deletions
@@ -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()
}