Suggest expressions of the form '0x1234 * 1 day' instead of hex numbers with unit denominations.

This commit is contained in:
Daniel Kirchner
2018-03-02 10:22:58 +01:00
parent bd4c2b9bde
commit 454b470cee
+4 -2
View File
@@ -2041,12 +2041,14 @@ void TypeChecker::endVisit(Literal const& _literal)
if (v050)
m_errorReporter.fatalTypeError(
_literal.location(),
"Hexadecimal numbers cannot be used with unit denominations."
"Hexadecimal numbers cannot be used with unit denominations. "
"You can use an expression of the form '0x1234 * 1 day' instead."
);
else
m_errorReporter.warning(
_literal.location(),
"Hexadecimal numbers with unit denominations are deprecated."
"Hexadecimal numbers with unit denominations are deprecated. "
"You can use an expression of the form '0x1234 * 1 day' instead."
);
}
if (!_literal.annotation().type)