From 32acadf43d655413e65428475a35e7ef3bf8fb78 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 3 Aug 2017 21:47:13 +0100 Subject: Do not mark overloaded functions as shadowing --- 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 4fe52243..a7aa99df 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -6190,6 +6190,17 @@ BOOST_AUTO_TEST_CASE(shadowing_builtins_ignores_constructor) CHECK_SUCCESS_NO_WARNINGS(text); } +BOOST_AUTO_TEST_CASE(function_overload_is_not_shadowing) +{ + char const* text = R"( + contract C { + function f() {} + function f(uint) {} + } + )"; + CHECK_SUCCESS_NO_WARNINGS(text); +} + BOOST_AUTO_TEST_CASE(callable_crash) { char const* text = R"( -- cgit