From 76d3d248426994b35c5bc2d92e9ba479cbf44ddc Mon Sep 17 00:00:00 2001 From: Federico Bond Date: Wed, 4 Oct 2017 12:09:52 -0300 Subject: Do not consider shadowing in variable names inside event declarations --- test/libsolidity/SolidityNameAndTypeResolution.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') 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"( -- cgit