mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Add hasHexPrefix() to AST::Literal
This commit is contained in:
@@ -1886,7 +1886,7 @@ void TypeChecker::expectType(Expression const& _expression, Type const& _expecte
|
||||
{
|
||||
auto literal = dynamic_cast<Literal const*>(&_expression);
|
||||
|
||||
if (literal && !boost::starts_with(literal->value(), "0x"))
|
||||
if (literal && !literal->hasHexPrefix())
|
||||
m_errorReporter.warning(
|
||||
_expression.location(),
|
||||
"Decimal literal assigned to bytesXX variable will be left-aligned. "
|
||||
|
||||
Reference in New Issue
Block a user