Fix detection of recursive structs.

This commit is contained in:
chriseth
2018-04-03 16:27:28 +02:00
committed by Alex Beregszaszi
parent c42caedec2
commit 5bdadff0d8
4 changed files with 36 additions and 0 deletions
@@ -0,0 +1,15 @@
pragma experimental ABIEncoderV2;
contract C {
struct T { U u; V v; }
struct U { W w; }
struct V { W w; }
struct W { uint x; }
function f(T) public pure { }
}
// ----
// Warning: Experimental features are turned on. Do not use experimental features on live deployments.
@@ -0,0 +1,15 @@
pragma experimental ABIEncoderV2;
contract TestContract
{
struct SubStruct {
uint256 id;
}
struct TestStruct {
SubStruct subStruct1;
SubStruct subStruct2;
}
function addTestStruct(TestStruct) public pure {}
}
// ----
// Warning: Experimental features are turned on. Do not use experimental features on live deployments.