aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp
index dbc95c4f..ca848dd0 100644
--- a/libsolidity/analysis/TypeChecker.cpp
+++ b/libsolidity/analysis/TypeChecker.cpp
@@ -1305,8 +1305,9 @@ void TypeChecker::endVisit(BinaryOperation const& _operation)
_operation.leftExpression().annotation().isPure &&
_operation.rightExpression().annotation().isPure;
- if (_operation.getOperator() == Token::Exp)
+ if (_operation.getOperator() == Token::Exp || _operation.getOperator() == Token::SHL)
{
+ string operation = _operation.getOperator() == Token::Exp ? "exponentiation" : "shift";
if (
leftType->category() == Type::Category::RationalNumber &&
rightType->category() != Type::Category::RationalNumber
@@ -1320,7 +1321,7 @@ void TypeChecker::endVisit(BinaryOperation const& _operation)
))
m_errorReporter.warning(
_operation.location(),
- "Result of exponentiation has type " + commonType->toString() + " and thus "
+ "Result of " + operation + " has type " + commonType->toString() + " and thus "
"might overflow. Silence this warning by converting the literal to the "
"expected type."
);