Fix ICE related to mapping types in abstract contract constructor

This commit is contained in:
hrkrshnn
2021-05-31 14:56:49 +02:00
parent 2f0df8f054
commit 138873d918
7 changed files with 78 additions and 1 deletions
+6 -1
View File
@@ -588,7 +588,12 @@ bool TypeChecker::visit(VariableDeclaration const& _variable)
if (result)
{
bool isLibraryStorageParameter = (_variable.isLibraryFunctionParameter() && referenceType->location() == DataLocation::Storage);
bool callDataCheckRequired = ((_variable.isConstructorParameter() || _variable.isPublicCallableParameter()) && !isLibraryStorageParameter);
// We skip the calldata check for abstract contract constructors.
bool isAbstractConstructorParam = _variable.isConstructorParameter() && m_currentContract && m_currentContract->abstract();
bool callDataCheckRequired =
!isAbstractConstructorParam &&
(_variable.isConstructorParameter() || _variable.isPublicCallableParameter()) &&
!isLibraryStorageParameter;
if (callDataCheckRequired)
{
if (!referenceType->interfaceType(false))