aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-04 04:47:13 +0800
committerchriseth <chris@ethereum.org>2017-08-05 01:06:23 +0800
commit32acadf43d655413e65428475a35e7ef3bf8fb78 (patch)
treebafef82f60ee9630592e7e67540bd67b5da59d83 /test
parentdc0f85c4fb65fa385bb7145c73cc5edaba195483 (diff)
downloaddexon-solidity-32acadf43d655413e65428475a35e7ef3bf8fb78.tar
dexon-solidity-32acadf43d655413e65428475a35e7ef3bf8fb78.tar.gz
dexon-solidity-32acadf43d655413e65428475a35e7ef3bf8fb78.tar.bz2
dexon-solidity-32acadf43d655413e65428475a35e7ef3bf8fb78.tar.lz
dexon-solidity-32acadf43d655413e65428475a35e7ef3bf8fb78.tar.xz
dexon-solidity-32acadf43d655413e65428475a35e7ef3bf8fb78.tar.zst
dexon-solidity-32acadf43d655413e65428475a35e7ef3bf8fb78.zip
Do not mark overloaded functions as shadowing
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp11
1 files changed, 11 insertions, 0 deletions
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"(