aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--test/libsolidity/syntaxTests/inheritance/override/function_state_variable.sol2
-rw-r--r--test/libsolidity/syntaxTests/inheritance/override/state_variable_function.sol8
2 files changed, 10 insertions, 0 deletions
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 00000000..023a161a
--- /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 00000000..0f05cc8e
--- /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.