Add hasHexPrefix() to AST::Literal

This commit is contained in:
Alex Beregszaszi
2017-06-28 16:57:32 +01:00
parent 79d1336687
commit 8b0c866f02
3 changed files with 16 additions and 7 deletions
+1 -1
View File
@@ -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. "