Do not exclude public state variables when looking for conflicting declarations.

This commit is contained in:
Daniel Kirchner
2018-08-01 14:31:04 +02:00
parent ce99a5ce7f
commit 30d9961efb
6 changed files with 29 additions and 8 deletions
@@ -8,4 +8,5 @@ contract C {
}
}
// ----
// DeclarationError: (150-179): Identifier already declared.
// DeclarationError: (114-120): Identifier not found or not unique.
@@ -0,0 +1,6 @@
contract C {
function f(uint) public pure {}
uint public f = 0;
}
// ----
// DeclarationError: (53-70): Identifier already declared.
@@ -0,0 +1,6 @@
contract C {
uint public f = 0;
function f(uint) public pure {}
}
// ----
// DeclarationError: (40-71): Identifier already declared.
@@ -0,0 +1,14 @@
// This used to crash with some compiler versions.
contract SomeContract {
uint public balance = 0;
function balance(uint number) public {}
function doSomething() public {
balance(3);
}
}
// ----
// DeclarationError: (106-145): Identifier already declared.
// TypeError: (185-195): Type is not callable