If a declaration shadows several others, group them together

This commit is contained in:
a3d4
2020-10-08 21:01:25 +02:00
parent f29ebc0847
commit 90c8c32d86
6 changed files with 56 additions and 36 deletions
@@ -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.