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

14 lines
299 B
Solidity

contract C {
struct S { uint x; }
S s;
struct T { uint y; }
T t;
function f() public view {
bytes32 a = sha256(abi.encodePacked(s, t));
a;
}
}
// ----
// TypeError: (156-157): This type cannot be encoded.
// TypeError: (159-160): This type cannot be encoded.