Moved a check related to constants to TypeChecker

And added a proper error message when constant types containing (nested) mapping types are used.
This commit is contained in:
hrkrshnn
2021-10-26 18:43:04 +02:00
parent 51009c005d
commit 8815d6f5f0
15 changed files with 30 additions and 21 deletions
+2
View File
@@ -1124,6 +1124,8 @@ public:
bool containsNestedMapping() const override
{
solAssert(nameable(), "Called for a non nameable type.");
// DeclarationTypeChecker::endVisit(VariableDeclaration const&)
// assumes that this will never be true.
solAssert(!underlyingType().containsNestedMapping(), "");
return false;
}