We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 059349f commit 49a878bCopy full SHA for 49a878b
libsolidity/analysis/PostTypeContractLevelChecker.cpp
@@ -118,6 +118,15 @@ void PostTypeContractLevelChecker::checkStorageLayoutSpecifier(ContractDefinitio
118
rational baseSlotRationalValue;
119
if (auto const integerType = dynamic_cast<IntegerType const*>(baseSlotExpressionType))
120
{
121
+ if (integerType->isSigned())
122
+ {
123
+ m_errorReporter.typeError(
124
+ 1481_error,
125
+ baseSlotExpression.location(),
126
+ "The base slot expression must be a constant unsigned integer value."
127
+ );
128
+ return;
129
+ }
130
std::optional<ConstantEvaluator::TypedRational> typedRational = ConstantEvaluator::evaluate(m_errorReporter, baseSlotExpression);
131
if (!typedRational)
132
0 commit comments