mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
updated algorithm for bit finding...now to figure out literal value
tiny fixups changed location of the check got rid of extra space and fixed a couple of things added binary results bits change back literal value
This commit is contained in:
1 parent
5bddb2d6ff
commit
bfc238c8d1
6 files changed
+105
-146
No files matched your search
@@ -104,10 +104,8 @@ void ReferencesResolver::endVisit(ArrayTypeName const& _typeName)
|
||||
if (!length->annotation().type)
|
||||
ConstantEvaluator e(*length);
|
||||
auto const* lengthType = dynamic_cast<RationalNumberType const*>(length->annotation().type.get());
|
||||
if (!lengthType)
|
||||
fatalTypeError(length->location(), "Invalid array length.");
|
||||
else if (lengthType->denominator() != 1)
|
||||
fatalTypeError(length->location(), "Invalid input for array length, expected integer.");
|
||||
if (!lengthType || lengthType->denominator() != 1)
|
||||
fatalTypeError(length->location(), "Invalid array length, expected integer literal.");
|
||||
else
|
||||
_typeName.annotation().type = make_shared<ArrayType>(DataLocation::Storage, baseType, lengthType->literalValue(nullptr));
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user