From 0542df25df5c1de5a4b62524c1fa40097b131caa Mon Sep 17 00:00:00 2001 From: Yoichi Hirai Date: Tue, 18 Oct 2016 13:25:00 +0200 Subject: Add a test for #1242 This is about `super` as an expression. --- test/libsolidity/SolidityEndToEndTest.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/libsolidity') 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"( -- cgit