aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests
diff options
context:
space:
mode:
authorDaniel Kirchner <daniel@ekpyron.org>2018-07-16 21:44:31 +0800
committerDaniel Kirchner <daniel@ekpyron.org>2018-08-01 23:18:17 +0800
commit4bcc4d2fcffa15a0bee8b514098757a8764c152c (patch)
tree03c15b04dcf70333e48e3552ee54b18e6c5deaf6 /test/libsolidity/syntaxTests
parentcea46acef75781d80bf4797f9e836ce8077796fd (diff)
downloaddexon-solidity-4bcc4d2fcffa15a0bee8b514098757a8764c152c.tar.gz
dexon-solidity-4bcc4d2fcffa15a0bee8b514098757a8764c152c.tar.zst
dexon-solidity-4bcc4d2fcffa15a0bee8b514098757a8764c152c.zip
Add additional test cases.
Diffstat (limited to 'test/libsolidity/syntaxTests')
-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.