Fix crash due to missing type info

This commit is contained in:
Mathias Baumann 2019-02-19 12:16:15 +01:00
parent d9e4a10d5a
commit a63f7ca9df
3 changed files with 10 additions and 1 deletions

View File

@ -12,6 +12,7 @@ Bugfixes:
* ABIEncoderV2: Fix internal error related to bare delegatecall.
* ABIEncoderV2: Fix internal error related to ecrecover.
* ABIEncoderV2: Fix internal error related to mappings as library parameters.
* SMTChecker: Fixed crash when used with fixed-sized arrays.
* Yul: Properly detect name clashes with functions before their declaration.

View File

@ -246,7 +246,7 @@ void ReferencesResolver::endVisit(ArrayTypeName const& _typeName)
fatalTypeError(_typeName.baseType().location(), "Illegal base type of storage size zero for array.");
if (Expression const* length = _typeName.length())
{
TypePointer lengthTypeGeneric = length->annotation().type;
TypePointer& lengthTypeGeneric = length->annotation().type;
if (!lengthTypeGeneric)
lengthTypeGeneric = ConstantEvaluator(m_errorReporter).evaluate(*length);
RationalNumberType const* lengthType = dynamic_cast<RationalNumberType const*>(lengthTypeGeneric.get());

View File

@ -0,0 +1,8 @@
pragma experimental SMTChecker;
contract C
{
// Used to crash because Literal had no type
int[3] d;
}
// ----
// Warning: (92-100): Assertion checker does not yet support the type of this variable.