From 498acbccbffe6bf54e74ce7535a8d98af1c94b71 Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Tue, 13 Jun 2017 16:25:52 +0200 Subject: [PATCH] Add a failing test as suggested in https://github.com/ethereum/solidity/pull/2275#discussion_r121438333 --- test/libsolidity/SolidityNameAndTypeResolution.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index cbe936546d5c..c48444e092a7 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -5793,6 +5793,15 @@ BOOST_AUTO_TEST_CASE(returndatacopy_as_variable) CHECK_WARNING_ALLOW_MULTI(text, "Variable is shadowed in an inline assembly by an insturction of the same name"); } +BOOST_AUTO_TEST_CASE(shadowing_warning_can_be_removed) +{ + char const* text = R"( + contract C {function f() {assembly {}}} + )"; + CHECK_SUCCESS_NO_WARNINGS(text); +} + + BOOST_AUTO_TEST_SUITE_END()