Added additional functions for UserDefinedValueType

This is a safety check, when the custom types get extended in the future.
This commit is contained in:
hrkrshnn 2021-09-28 12:21:20 +02:00
parent 137c890039
commit 7faaa94c6e

View File

@ -1121,6 +1121,25 @@ public:
return true;
}
bool containsNestedMapping() const override
{
solAssert(nameable(), "Called for a non nameable type.");
solAssert(!underlyingType().containsNestedMapping(), "");
return false;
}
bool hasSimpleZeroValueInMemory() const override
{
solAssert(underlyingType().hasSimpleZeroValueInMemory(), "");
return true;
}
bool dataStoredIn(DataLocation _loc) const override
{
solAssert(!underlyingType().dataStoredIn(_loc), "");
return false;
}
std::string toString(bool _short) const override;
std::string canonicalName() const override { solAssert(false, ""); }
std::string signatureInExternalFunction(bool) const override { solAssert(false, ""); }