aboutsummaryrefslogtreecommitdiffstats
path: root/test/libsolidity/syntaxTests/specialFunctions/abi_encode_structs.sol
blob: d9eebee428d3f29b202ae0ea0444522260c440b5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
contract C {
    struct S { uint x; }
    S s;
    struct T { uint y; }
    T t;
    function f() public view {
        abi.encode(s, t);
    }
    function g() public view {
        abi.encodePacked(s, t);
    }
}
// ----
// TypeError: (131-132): This type cannot be encoded.
// TypeError: (134-135): This type cannot be encoded.
// TypeError: (200-201): This type cannot be encoded.
// TypeError: (203-204): This type cannot be encoded.