aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/SolidityEndToEndTest.cpp
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2018-11-26 21:26:55 +0800
committerGitHub <noreply@github.com>2018-11-26 21:26:55 +0800
commit7921e5f0b9ff954fd08be6a4f5014f844c0cf10d (patch)
tree9e33fff524f26fad8f5c21424bc80f1adf376195 /test/libsolidity/SolidityEndToEndTest.cpp
parent9ac7c748f8b954e712ba78f1431a1b5151a4ad86 (diff)
parentac5803bf3e5dc43adf8bf64c1041603259e8a16f (diff)
downloaddexon-solidity-7921e5f0b9ff954fd08be6a4f5014f844c0cf10d.tar
dexon-solidity-7921e5f0b9ff954fd08be6a4f5014f844c0cf10d.tar.gz
dexon-solidity-7921e5f0b9ff954fd08be6a4f5014f844c0cf10d.tar.bz2
dexon-solidity-7921e5f0b9ff954fd08be6a4f5014f844c0cf10d.tar.lz
dexon-solidity-7921e5f0b9ff954fd08be6a4f5014f844c0cf10d.tar.xz
dexon-solidity-7921e5f0b9ff954fd08be6a4f5014f844c0cf10d.tar.zst
dexon-solidity-7921e5f0b9ff954fd08be6a4f5014f844c0cf10d.zip
Merge pull request #5486 from ethereum/allowExternalPublicOverride
Allow external public override
Diffstat (limited to 'test/libsolidity/SolidityEndToEndTest.cpp')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index e591432a..e9667483 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -14062,6 +14062,21 @@ BOOST_AUTO_TEST_CASE(flipping_sign_tests)
ABI_CHECK(callContractFunction("f()"), encodeArgs(true));
}
+BOOST_AUTO_TEST_CASE(external_public_override)
+{
+ char const* sourceCode = R"(
+ contract A {
+ function f() external returns (uint) { return 1; }
+ }
+ contract B is A {
+ function f() public returns (uint) { return 2; }
+ function g() public returns (uint) { return f(); }
+ }
+ )";
+ compileAndRun(sourceCode);
+ ABI_CHECK(callContractFunction("f()"), encodeArgs(2));
+ ABI_CHECK(callContractFunction("g()"), encodeArgs(2));
+}
BOOST_AUTO_TEST_SUITE_END()
}