mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix stack size of typetypes.
This commit is contained in:
parent
77374a46ce
commit
8c8def6b3c
@ -1877,6 +1877,22 @@ BOOST_AUTO_TEST_CASE(use_std_lib)
|
|||||||
BOOST_CHECK(m_state.balance(m_sender) > balanceBefore);
|
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()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user