mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix detection of recursive structs.
This commit is contained in:
committed by
Alex Beregszaszi
parent
c42caedec2
commit
5bdadff0d8
@@ -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.
|
||||
Reference in New Issue
Block a user