solidity/test/libsolidity/syntaxTests/parsing/mapping_nonelementary_key_3.sol
hrkrshnn 1fa6c71bd0 Allow Mapping keys to have type UserDefinedValueType.
Also added syntax and semantic test.
2021-09-13 10:03:49 +02:00

9 lines
206 B
Solidity

contract c {
struct S {
string s;
}
mapping(S => uint) data;
}
// ----
// TypeError 7804: (49-50): Only elementary types, user defined value types, contract types or enums are allowed as mapping keys.