aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2017-08-21 22:43:15 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-22 18:39:50 +0800
commit7b0046a9aafffec4e42be7e30c283e07ca1841b9 (patch)
tree34e7bf7755202604bb2e3e39dc8362f187355a28 /test
parentb25f0c52ac01857a82dda20ec2b646c7ae90cd7d (diff)
downloaddexon-solidity-7b0046a9aafffec4e42be7e30c283e07ca1841b9.tar
dexon-solidity-7b0046a9aafffec4e42be7e30c283e07ca1841b9.tar.gz
dexon-solidity-7b0046a9aafffec4e42be7e30c283e07ca1841b9.tar.bz2
dexon-solidity-7b0046a9aafffec4e42be7e30c283e07ca1841b9.tar.lz
dexon-solidity-7b0046a9aafffec4e42be7e30c283e07ca1841b9.tar.xz
dexon-solidity-7b0046a9aafffec4e42be7e30c283e07ca1841b9.tar.zst
dexon-solidity-7b0046a9aafffec4e42be7e30c283e07ca1841b9.zip
Check inheritance specifier arguments for interfaces.
Diffstat (limited to 'test')
-rw-r--r--test/libsolidity/SolidityNameAndTypeResolution.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp
index a4fc9c98..f5f607ca 100644
--- a/test/libsolidity/SolidityNameAndTypeResolution.cpp
+++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp
@@ -6735,6 +6735,15 @@ BOOST_AUTO_TEST_CASE(accept_library_creation)
CHECK_SUCCESS(text);
}
+BOOST_AUTO_TEST_CASE(reject_interface_constructors)
+{
+ char const* text = R"(
+ interface I {}
+ contract C is I(2) {}
+ )";
+ CHECK_ERROR(text, TypeError, "Wrong argument count for constructor call: 1 arguments given but expected 0.");
+}
+
BOOST_AUTO_TEST_SUITE_END()
}