diff options
author | Federico Bond <federicobond@gmail.com> | 2017-10-04 23:09:52 +0800 |
---|---|---|
committer | Federico Bond <federicobond@gmail.com> | 2017-10-05 00:30:26 +0800 |
commit | 76d3d248426994b35c5bc2d92e9ba479cbf44ddc (patch) | |
tree | c3ab8259ae40634a0b6f84ddee37b273c97a7651 /test | |
parent | 19274c78904632d568bf56e95603d22ef091ce77 (diff) | |
download | dexon-solidity-76d3d248426994b35c5bc2d92e9ba479cbf44ddc.tar dexon-solidity-76d3d248426994b35c5bc2d92e9ba479cbf44ddc.tar.gz dexon-solidity-76d3d248426994b35c5bc2d92e9ba479cbf44ddc.tar.bz2 dexon-solidity-76d3d248426994b35c5bc2d92e9ba479cbf44ddc.tar.lz dexon-solidity-76d3d248426994b35c5bc2d92e9ba479cbf44ddc.tar.xz dexon-solidity-76d3d248426994b35c5bc2d92e9ba479cbf44ddc.tar.zst dexon-solidity-76d3d248426994b35c5bc2d92e9ba479cbf44ddc.zip |
Do not consider shadowing in variable names inside event declarations
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index ed223678..350d41f1 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -6371,6 +6371,17 @@ BOOST_AUTO_TEST_CASE(function_override_is_not_shadowing) CHECK_SUCCESS_NO_WARNINGS(text); } +BOOST_AUTO_TEST_CASE(event_parameter_cannot_shadow_state_variable) +{ + char const* text = R"( + contract C { + address a; + event E(address a); + } + )"; + CHECK_SUCCESS_NO_WARNINGS(text); +} + BOOST_AUTO_TEST_CASE(callable_crash) { char const* text = R"( |