mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Do not warn about shadowing parameters in functions without implementation
This commit is contained in:
+20
@@ -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.
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
contract C {
|
||||
function f(uint f) pure public {}
|
||||
}
|
||||
// ----
|
||||
// Warning 2519: (28-34): This declaration shadows an existing declaration.
|
||||
Reference in New Issue
Block a user