From 4bcc4d2fcffa15a0bee8b514098757a8764c152c Mon Sep 17 00:00:00 2001 From: Daniel Kirchner Date: Mon, 16 Jul 2018 15:44:31 +0200 Subject: [PATCH] Add additional test cases. --- .../inheritance/override/function_state_variable.sol | 2 ++ .../inheritance/override/state_variable_function.sol | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 test/libsolidity/syntaxTests/inheritance/override/function_state_variable.sol create mode 100644 test/libsolidity/syntaxTests/inheritance/override/state_variable_function.sol diff --git a/test/libsolidity/syntaxTests/inheritance/override/function_state_variable.sol b/test/libsolidity/syntaxTests/inheritance/override/function_state_variable.sol new file mode 100644 index 000000000..023a161ae --- /dev/null +++ b/test/libsolidity/syntaxTests/inheritance/override/function_state_variable.sol @@ -0,0 +1,2 @@ +interface ERC20 { function x() external returns (uint); } +contract C is ERC20 { uint public x; } diff --git a/test/libsolidity/syntaxTests/inheritance/override/state_variable_function.sol b/test/libsolidity/syntaxTests/inheritance/override/state_variable_function.sol new file mode 100644 index 000000000..0f05cc8eb --- /dev/null +++ b/test/libsolidity/syntaxTests/inheritance/override/state_variable_function.sol @@ -0,0 +1,8 @@ +contract A { + uint public x; +} +contract C is A { + function x() public returns (uint); +} +// ---- +// DeclarationError: (50-85): Identifier already declared.