mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Use the proper error reporting interface in ConstantEvaluator
This commit is contained in:
1 parent
c28ed2a619
commit
ed62b2583c
3 files changed
+13
-7
No files matched your search
@@ -147,7 +147,7 @@ void ReferencesResolver::endVisit(ArrayTypeName const& _typeName)
|
||||
if (Expression const* length = _typeName.length())
|
||||
{
|
||||
if (!length->annotation().type)
|
||||
ConstantEvaluator e(*length);
|
||||
ConstantEvaluator e(*length, m_errorReporter);
|
||||
auto const* lengthType = dynamic_cast<RationalNumberType const*>(length->annotation().type.get());
|
||||
if (!lengthType || !lengthType->mobileType())
|
||||
fatalTypeError(length->location(), "Invalid array length, expected integer literal.");
|
||||
|
||||
Reference in new issue
Block a user