diff options
author | chriseth <chris@ethereum.org> | 2018-06-29 06:29:52 +0800 |
---|---|---|
committer | chriseth <chris@ethereum.org> | 2018-06-29 22:11:21 +0800 |
commit | f69e24c85e9e4131fe393cc0cf64900a19a88cc9 (patch) | |
tree | 073844cfe4cd8cbac6a31923b117353f91b41690 /libsolidity | |
parent | e289c36158701ba0b874051e9e426e270b0e38e2 (diff) | |
download | dexon-solidity-f69e24c85e9e4131fe393cc0cf64900a19a88cc9.tar.gz dexon-solidity-f69e24c85e9e4131fe393cc0cf64900a19a88cc9.tar.zst dexon-solidity-f69e24c85e9e4131fe393cc0cf64900a19a88cc9.zip |
Disallow constructor arguments given multiple times.
Diffstat (limited to 'libsolidity')
-rw-r--r-- | libsolidity/analysis/TypeChecker.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/libsolidity/analysis/TypeChecker.cpp b/libsolidity/analysis/TypeChecker.cpp index b9e3f8d0..3bd0b4c1 100644 --- a/libsolidity/analysis/TypeChecker.cpp +++ b/libsolidity/analysis/TypeChecker.cpp @@ -335,8 +335,6 @@ void TypeChecker::annotateBaseConstructorArguments( ASTNode const* _argumentNode ) { - bool const v050 = _currentContract.sourceUnit().annotation().experimentalFeatures.count(ExperimentalFeature::V050); - solAssert(_baseConstructor, ""); solAssert(_argumentNode, ""); @@ -365,18 +363,11 @@ void TypeChecker::annotateBaseConstructorArguments( ssl.append("Second constructor call is here: ", previousNode->location()); } - if (v050) - m_errorReporter.declarationError( - *mainLocation, - ssl, - "Base constructor arguments given twice." - ); - else - m_errorReporter.warning( - *mainLocation, - "Base constructor arguments given twice.", - ssl - ); + m_errorReporter.declarationError( + *mainLocation, + ssl, + "Base constructor arguments given twice." + ); } } |