mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Check for constness of address constant.
This commit is contained in:
parent
793f05fa3f
commit
b86a4cad57
@ -2284,6 +2284,16 @@ BOOST_AUTO_TEST_CASE(constant_struct)
|
|||||||
CHECK_ERROR(text, TypeError, "implemented");
|
CHECK_ERROR(text, TypeError, "implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
BOOST_AUTO_TEST_CASE(address_is_constant)
|
||||||
|
{
|
||||||
|
char const* text = R"(
|
||||||
|
contract C {
|
||||||
|
address constant x = 0x1212121212121212121212121212121212121212;
|
||||||
|
}
|
||||||
|
)";
|
||||||
|
CHECK_SUCCESS_NO_WARNINGS(text);
|
||||||
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_CASE(uninitialized_const_variable)
|
BOOST_AUTO_TEST_CASE(uninitialized_const_variable)
|
||||||
{
|
{
|
||||||
char const* text = R"(
|
char const* text = R"(
|
||||||
|
Loading…
Reference in New Issue
Block a user