Add a test for #1242

This is about `super` as an expression.
This commit is contained in:
Yoichi Hirai 2016-10-18 13:25:00 +02:00
parent 0a9eb64562
commit 0542df25df
No known key found for this signature in database
GPG Key ID: E7B75D080FCF7992

View File

@ -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"(