solidity/test/libsolidity/syntaxTests/specialFunctions/types_with_unspecified_encoding_structs.sol

14 lines
299 B
Solidity
Raw Normal View History

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