From 72e87423db8d938a4ef5eea92a56332c607accdb Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Thu, 21 Jun 2018 00:01:40 +0200 Subject: Disallow the years unit denomination properly --- libsolidity/analysis/TypeChecker.cpp | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) (limited to 'libsolidity/analysis') diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index c19ca76d..19e931f2 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -2316,18 +2316,10 @@ void TypeChecker::endVisit(Literal const& _literal) } if (_literal.subDenomination() == Literal::SubDenomination::Year) - { - if (v050) - m_errorReporter.typeError( - _literal.location(), - "Using \"years\" as a unit denomination is deprecated." - ); - else - m_errorReporter.warning( - _literal.location(), - "Using \"years\" as a unit denomination is deprecated." - ); - } + m_errorReporter.typeError( + _literal.location(), + "Using \"years\" as a unit denomination is deprecated." + ); if (!_literal.annotation().type) _literal.annotation().type = Type::forLiteral(_literal); -- cgit