solidity/test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_2.sol

9 lines
173 B
Solidity
Raw Normal View History

contract c {
struct S {
uint x;
}
mapping(S => uint) data;
}
// ----
// TypeError: (47-48): Only elementary types, contract types or enums are allowed as mapping keys.