Merge pull request #12646 from ethereum/develop

Merging develop into breaking.
This commit is contained in:
chriseth
2022-02-08 12:00:34 +01:00
committed by GitHub
49 changed files with 585 additions and 200 deletions
@@ -441,7 +441,7 @@ void DeclarationTypeChecker::endVisit(VariableDeclaration const& _variable)
{
bool allowed = false;
if (auto arrayType = dynamic_cast<ArrayType const*>(type))
allowed = arrayType->isByteArray();
allowed = arrayType->isByteArrayOrString();
if (!allowed)
m_errorReporter.fatalTypeError(9259_error, _variable.location(), "Only constants of value type and byte array type are implemented.");
}
+2 -2
View File
@@ -1783,7 +1783,7 @@ Type const* TypeChecker::typeCheckTypeConversionAndRetrieveReturnType(
(
(
resultArrayType->isPointer() ||
(argArrayType->isByteArray() && resultArrayType->isByteArray())
(argArrayType->isByteArrayOrString() && resultArrayType->isByteArrayOrString())
) &&
resultArrayType->location() == DataLocation::Storage
),
@@ -1791,7 +1791,7 @@ Type const* TypeChecker::typeCheckTypeConversionAndRetrieveReturnType(
);
else
solAssert(
argArrayType->isByteArray() && !argArrayType->isString() && resultType->category() == Type::Category::FixedBytes,
argArrayType->isByteArray() && resultType->category() == Type::Category::FixedBytes,
""
);
}