mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
If a declaration shadows several others, group them together
This commit is contained in:
@@ -16,5 +16,4 @@ contract D is C {
|
||||
// ----
|
||||
// Warning 2519: (s1.sol:65-134): This declaration shadows an existing declaration.
|
||||
// Warning 2519: (s2.sol:85-155): This declaration shadows an existing declaration.
|
||||
// Warning 2519: (s2.sol:85-155): This declaration shadows an existing declaration.
|
||||
// DeclarationError 1686: (s2.sol:17-64): Function with same name and parameter types defined twice.
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
contract test {
|
||||
function e() external { }
|
||||
function f() public pure { uint e; e = 0; }
|
||||
function e(int) external { }
|
||||
}
|
||||
// ----
|
||||
// Warning 8760: (77-83): This declaration has the same name as another declaration.
|
||||
@@ -0,0 +1,10 @@
|
||||
function e() {}
|
||||
contract test {
|
||||
function f() pure public { uint e; uint g; uint h; e = g = h = 0; }
|
||||
function g() pure public {}
|
||||
}
|
||||
function h() {}
|
||||
// ----
|
||||
// Warning 2519: (63-69): This declaration shadows an existing declaration.
|
||||
// Warning 2519: (71-77): This declaration shadows an existing declaration.
|
||||
// Warning 2519: (79-85): This declaration shadows an existing declaration.
|
||||
Reference in New Issue
Block a user