diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-02-27 19:02:56 +0800 |
---|---|---|
committer | Alex Beregszaszi <alex@rtfs.hu> | 2018-03-26 18:35:17 +0800 |
commit | ef3595b0001614c19174c61d29d221844ed83a0e (patch) | |
tree | fe46d4e1ba7ae882c026145086482f9de75608f9 /test | |
parent | ba209fe485ba40ea3926800bc90932bec40cd16f (diff) | |
download | dexon-solidity-ef3595b0001614c19174c61d29d221844ed83a0e.tar dexon-solidity-ef3595b0001614c19174c61d29d221844ed83a0e.tar.gz dexon-solidity-ef3595b0001614c19174c61d29d221844ed83a0e.tar.bz2 dexon-solidity-ef3595b0001614c19174c61d29d221844ed83a0e.tar.lz dexon-solidity-ef3595b0001614c19174c61d29d221844ed83a0e.tar.xz dexon-solidity-ef3595b0001614c19174c61d29d221844ed83a0e.tar.zst dexon-solidity-ef3595b0001614c19174c61d29d221844ed83a0e.zip |
Allow overriding external functions in interfaces with public in an implementing contract
Diffstat (limited to 'test')
-rw-r--r-- | test/libsolidity/SolidityNameAndTypeResolution.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityNameAndTypeResolution.cpp b/test/libsolidity/SolidityNameAndTypeResolution.cpp index 50ee2b2e..e30ea8a4 100644 --- a/test/libsolidity/SolidityNameAndTypeResolution.cpp +++ b/test/libsolidity/SolidityNameAndTypeResolution.cpp @@ -6784,6 +6784,20 @@ BOOST_AUTO_TEST_CASE(using_interface_complex) CHECK_SUCCESS(text); } +BOOST_AUTO_TEST_CASE(interface_implement_public_contract) +{ + char const* text = R"( + interface I { + function f() external; + } + contract C is I { + function f() public { + } + } + )"; + CHECK_SUCCESS_NO_WARNINGS(text); +} + BOOST_AUTO_TEST_CASE(warn_about_throw) { char const* text = R"( |