mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #3209 from ethereum/unimplemented-msgs
Add explanation to unimplemented assertions
This commit is contained in:
commit
0c1fc594ef
@ -483,7 +483,7 @@ string ABIFunctions::abiEncodingFunctionCalldataArray(
|
|||||||
_to.identifier() +
|
_to.identifier() +
|
||||||
(_encodeAsLibraryTypes ? "_library" : "");
|
(_encodeAsLibraryTypes ? "_library" : "");
|
||||||
return createFunction(functionName, [&]() {
|
return createFunction(functionName, [&]() {
|
||||||
solUnimplementedAssert(fromArrayType.isByteArray(), "");
|
solUnimplementedAssert(fromArrayType.isByteArray(), "Only byte arrays can be encoded from calldata currently.");
|
||||||
// TODO if this is not a byte array, we might just copy byte-by-byte anyway,
|
// TODO if this is not a byte array, we might just copy byte-by-byte anyway,
|
||||||
// because the encoding is position-independent, but we have to check that.
|
// because the encoding is position-independent, but we have to check that.
|
||||||
Whiskers templ(R"(
|
Whiskers templ(R"(
|
||||||
@ -754,7 +754,7 @@ string ABIFunctions::abiEncodingFunctionStruct(
|
|||||||
_to.identifier() +
|
_to.identifier() +
|
||||||
(_encodeAsLibraryTypes ? "_library" : "");
|
(_encodeAsLibraryTypes ? "_library" : "");
|
||||||
|
|
||||||
solUnimplementedAssert(!_from.dataStoredIn(DataLocation::CallData), "");
|
solUnimplementedAssert(!_from.dataStoredIn(DataLocation::CallData), "Encoding struct from calldata is not yet supported.");
|
||||||
solAssert(&_from.structDefinition() == &_to.structDefinition(), "");
|
solAssert(&_from.structDefinition() == &_to.structDefinition(), "");
|
||||||
|
|
||||||
return createFunction(functionName, [&]() {
|
return createFunction(functionName, [&]() {
|
||||||
|
@ -121,7 +121,7 @@ void CompilerUtils::storeInMemoryDynamic(Type const& _type, bool _padToWordBound
|
|||||||
{
|
{
|
||||||
if (auto ref = dynamic_cast<ReferenceType const*>(&_type))
|
if (auto ref = dynamic_cast<ReferenceType const*>(&_type))
|
||||||
{
|
{
|
||||||
solUnimplementedAssert(ref->location() == DataLocation::Memory, "");
|
solUnimplementedAssert(ref->location() == DataLocation::Memory, "Only in-memory reference type can be stored.");
|
||||||
storeInMemoryDynamic(IntegerType(256), _padToWordBoundaries);
|
storeInMemoryDynamic(IntegerType(256), _padToWordBoundaries);
|
||||||
}
|
}
|
||||||
else if (auto str = dynamic_cast<StringLiteralType const*>(&_type))
|
else if (auto str = dynamic_cast<StringLiteralType const*>(&_type))
|
||||||
|
Loading…
Reference in New Issue
Block a user