mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Allow dynamic types in public mappings
This commit is contained in:
@@ -511,14 +511,6 @@ bool TypeChecker::visit(VariableDeclaration const& _variable)
|
||||
)
|
||||
m_errorReporter.typeError(_variable.location(), "Array is too large to be encoded.");
|
||||
break;
|
||||
case Type::Category::Mapping:
|
||||
if (auto mappingType = dynamic_cast<MappingType const*>(varType.get()))
|
||||
if (
|
||||
mappingType->keyType()->isDynamicallySized() &&
|
||||
_variable.visibility() == Declaration::Visibility::Public
|
||||
)
|
||||
m_errorReporter.typeError(_variable.location(), "Dynamically-sized keys for public mappings are not supported.");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user