mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #3228 from ethereum/docs-tests-struct
Enable struct abi example with experimental pragma
This commit is contained in:
commit
eebeb52aed
@ -377,10 +377,14 @@ As an example, the code
|
|||||||
|
|
||||||
::
|
::
|
||||||
|
|
||||||
|
pragma solidity ^0.4.19;
|
||||||
|
pragma experimental ABIEncoderV2;
|
||||||
|
|
||||||
contract Test {
|
contract Test {
|
||||||
struct S { uint a; uint[] b; T[] c; }
|
struct S { uint a; uint[] b; T[] c; }
|
||||||
struct T { uint x; uint y; }
|
struct T { uint x; uint y; }
|
||||||
function f(S s, T t, uint a) { }
|
function f(S s, T t, uint a) { }
|
||||||
|
function g() returns (S s, T t, uint a) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
would result in the JSON:
|
would result in the JSON:
|
||||||
|
Loading…
Reference in New Issue
Block a user