Merge pull request #3228 from ethereum/docs-tests-struct

Enable struct abi example with experimental pragma
This commit is contained in:
chriseth 2017-12-11 14:26:15 +01:00 committed by GitHub
commit eebeb52aed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: