mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #2235 from chriseth/sol_fix_recursiveStructs
Fix and test for not really recursive structs.
This commit is contained in:
commit
93a6f63669
@ -190,6 +190,17 @@ BOOST_AUTO_TEST_CASE(struct_definition_indirectly_recursive)
|
||||
BOOST_CHECK_THROW(parseTextAndResolveNames(text), ParserError);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(struct_definition_not_really_recursive)
|
||||
{
|
||||
char const* text = R"(
|
||||
contract test {
|
||||
struct s1 { uint a; }
|
||||
struct s2 { s1 x; s1 y; }
|
||||
}
|
||||
)";
|
||||
BOOST_CHECK_NO_THROW(parseTextAndResolveNames(text));
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(struct_definition_recursion_via_mapping)
|
||||
{
|
||||
char const* text = "contract test {\n"
|
||||
|
Loading…
Reference in New Issue
Block a user