diff options
author | Christian <c@ethdev.com> | 2015-01-29 01:19:01 +0800 |
---|---|---|
committer | Christian <c@ethdev.com> | 2015-01-29 01:19:01 +0800 |
commit | 8c8def6b3c3af33c1faf5fc04e6341c9419ac188 (patch) | |
tree | 8b8a006569e6505f8b55f2b1edcd1ea2e5867ef1 | |
parent | 77374a46cef6308c58465f5197919d9ac67cb666 (diff) | |
download | dexon-solidity-8c8def6b3c3af33c1faf5fc04e6341c9419ac188.tar.gz dexon-solidity-8c8def6b3c3af33c1faf5fc04e6341c9419ac188.tar.zst dexon-solidity-8c8def6b3c3af33c1faf5fc04e6341c9419ac188.zip |
Fix stack size of typetypes.
-rw-r--r-- | SolidityEndToEndTest.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/SolidityEndToEndTest.cpp b/SolidityEndToEndTest.cpp index 23cd4f6d..6c7b7502 100644 --- a/SolidityEndToEndTest.cpp +++ b/SolidityEndToEndTest.cpp @@ -1877,6 +1877,22 @@ BOOST_AUTO_TEST_CASE(use_std_lib) BOOST_CHECK(m_state.balance(m_sender) > balanceBefore); } +BOOST_AUTO_TEST_CASE(crazy_elementary_typenames_on_stack) +{ + char const* sourceCode = R"( + contract C { + function f() returns (uint r) { + uint; uint; uint; uint; + int x = -7; + var a = uint; + return a(x); + } + } + )"; + compileAndRun(sourceCode); + BOOST_CHECK(callContractFunction("f()") == encodeArgs(u256(-7))); +} + BOOST_AUTO_TEST_SUITE_END() } |