aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2018-06-21 06:01:40 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-06-22 02:21:02 +0800
commit72e87423db8d938a4ef5eea92a56332c607accdb (patch)
treeb35087edce7175dede56de0df7a8b457b020c0e3 /libsolidity/analysis
parent32f2db780c6d4d5ca507c595c8f15cacb51972c7 (diff)
downloaddexon-solidity-72e87423db8d938a4ef5eea92a56332c607accdb.tar.gz
dexon-solidity-72e87423db8d938a4ef5eea92a56332c607accdb.tar.zst
dexon-solidity-72e87423db8d938a4ef5eea92a56332c607accdb.zip
Disallow the years unit denomination properly
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/TypeChecker.cpp16
1 files changed, 4 insertions, 12 deletions
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);