Created
November 3, 2018 15:50
-
-
Save bshastry/f9d7c7104c79954fc2d38d8c050620b0 to your computer and use it in GitHub Desktop.
Solidity failing assertion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool StructType::canBeUsedExternally(bool _inLibrary) const | |
{ | |
if (_inLibrary && location() == DataLocation::Storage) | |
return true; | |
else if (recursive()) | |
return false; | |
else | |
{ | |
// Check that all members have interface types. | |
// We pass "false" to canBeUsedExternally (_inLibrary), because this struct will be | |
// passed by value and thus the encoding does not differ, but it will disallow | |
// mappings. | |
for (auto const& var: m_struct.members()) | |
{ | |
solAssert(var->annotation().type, ""); | |
if (!var->annotation().type->canBeUsedExternally(false)) | |
return false; | |
} | |
} | |
return true; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment