mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #11939 from ethereum/userdefined-types-mapping-key
Allow Mapping keys to have type UserDefinedValueType.
This commit is contained in:
@@ -253,12 +253,13 @@ void DeclarationTypeChecker::endVisit(Mapping const& _mapping)
|
||||
{
|
||||
case Type::Category::Enum:
|
||||
case Type::Category::Contract:
|
||||
case Type::Category::UserDefinedValueType:
|
||||
break;
|
||||
default:
|
||||
m_errorReporter.fatalTypeError(
|
||||
7804_error,
|
||||
typeName->location(),
|
||||
"Only elementary types, contract types or enums are allowed as mapping keys."
|
||||
"Only elementary types, user defined value types, contract types or enums are allowed as mapping keys."
|
||||
);
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user