solidity/test/libsolidity/syntaxTests/specialFunctions/types_with_unspecified_encoding_types.sol
2018-06-25 17:17:18 +02:00

18 lines
500 B
Solidity

contract C {
struct S { uint x; }
S s;
struct T { uint y; }
T t;
enum A { X, Y }
function f() public pure {
bytes memory a = abi.encodePacked(S, A, A.X, T, uint, uint[]);
a;
}
}
// ----
// TypeError: (174-175): This type cannot be encoded.
// TypeError: (177-178): This type cannot be encoded.
// TypeError: (185-186): This type cannot be encoded.
// TypeError: (188-192): This type cannot be encoded.
// TypeError: (194-200): This type cannot be encoded.