Do not warn about shadowing parameters in functions without implementation

This commit is contained in:
a3d4
2021-06-09 12:35:26 +02:00
committed by chriseth
parent edee67b4cc
commit 70b8b1c834
8 changed files with 44 additions and 5 deletions
@@ -0,0 +1,20 @@
interface I {
function f(uint I) external; // OK
}
library L {
function f(uint L) public pure {} // warning
}
abstract contract A {
function f(uint A) public pure {} // warning
function g(uint A) public virtual; // OK
}
contract C {
function f(uint C) public pure {} // warning
}
// ----
// Warning 2519: (91-97): This declaration shadows an existing declaration.
// Warning 2519: (168-174): This declaration shadows an existing declaration.
// Warning 2519: (283-289): This declaration shadows an existing declaration.
@@ -0,0 +1,5 @@
contract C {
function f(uint f) pure public {}
}
// ----
// Warning 2519: (28-34): This declaration shadows an existing declaration.