aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-10-19 16:33:41 +0800
committerGitHub <noreply@github.com>2016-10-19 16:33:41 +0800
commit65da8e4e160721cdf8fa86c8112a300d88335792 (patch)
tree07b18a29882255d984272acc433eed032ad5e611 /test/libsolidity
parent0fd6f2b5a6f5b3a977f4cabbe32582684a91bb2f (diff)
parenta743d7989b085d440693a3958f7541502db87def (diff)
downloaddexon-solidity-65da8e4e160721cdf8fa86c8112a300d88335792.tar.gz
dexon-solidity-65da8e4e160721cdf8fa86c8112a300d88335792.tar.zst
dexon-solidity-65da8e4e160721cdf8fa86c8112a300d88335792.zip
Merge pull request #1244 from ethereum/1242
`super`'s size on stack is zero
Diffstat (limited to 'test/libsolidity')
-rw-r--r--test/libsolidity/SolidityEndToEndTest.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/libsolidity/SolidityEndToEndTest.cpp b/test/libsolidity/SolidityEndToEndTest.cpp
index 155f117f..692abe57 100644
--- a/test/libsolidity/SolidityEndToEndTest.cpp
+++ b/test/libsolidity/SolidityEndToEndTest.cpp
@@ -2513,6 +2513,15 @@ BOOST_AUTO_TEST_CASE(super_in_constructor)
BOOST_CHECK(callContractFunction("f()") == encodeArgs(1 | 2 | 4 | 8));
}
+BOOST_AUTO_TEST_CASE(super_alone)
+{
+ char const* sourceCode = R"(
+ contract A { function f() { super; } }
+ )";
+ compileAndRun(sourceCode, 0, "A");
+ BOOST_CHECK(callContractFunction("f()") == encodeArgs());
+}
+
BOOST_AUTO_TEST_CASE(fallback_function)
{
char const* sourceCode = R"(