Update Types.cpp

This commit is contained in:
Liana Husikyan 2015-06-04 18:06:06 +02:00
parent 4e15a39107
commit a8505e598f

View File

@ -376,12 +376,12 @@ bool IntegerConstantType::isImplicitlyConvertibleTo(Type const& _convertTo) cons
return false; return false;
} }
else if (_convertTo.getCategory() == Category::FixedBytes) else if (_convertTo.getCategory() == Category::FixedBytes)
{ {
FixedBytesType const& fixedBytes = dynamic_cast<FixedBytesType const&>(_convertTo); FixedBytesType const& fixedBytes = dynamic_cast<FixedBytesType const&>(_convertTo);
return fixedBytes.getNumBytes() * 8 >= getIntegerType()->getNumBits(); return fixedBytes.getNumBytes() * 8 >= getIntegerType()->getNumBits();
} }
else else
return false; return false;
} }
bool IntegerConstantType::isExplicitlyConvertibleTo(Type const& _convertTo) const bool IntegerConstantType::isExplicitlyConvertibleTo(Type const& _convertTo) const