diff options
author | chriseth <chris@ethereum.org> | 2017-08-21 22:43:15 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2017-08-22 18:39:50 +0800 |
commit | 7b0046a9aafffec4e42be7e30c283e07ca1841b9 (patch) | |
tree | 34e7bf7755202604bb2e3e39dc8362f187355a28 /test | |
parent | b25f0c52ac01857a82dda20ec2b646c7ae90cd7d (diff) | |
download | dexon-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.cpp | 9 |
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() } |