mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Fix crash due to missing type info
This commit is contained in:
parent
d9e4a10d5a
commit
a63f7ca9df
@ -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.
|
||||
|
||||
|
||||
|
@ -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());
|
||||
|
8
test/libsolidity/smtCheckerTests/simple/static_array.sol
Normal file
8
test/libsolidity/smtCheckerTests/simple/static_array.sol
Normal 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.
|
Loading…
Reference in New Issue
Block a user