aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/analysis
diff options
context:
space:
mode:
authorChristian Parpart <christian@ethereum.org>2018-07-03 17:28:57 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2018-07-24 00:29:08 +0800
commit9f35f0b80571927ec89d77ec6827332c2ab60eba (patch)
treed7caff0e63513161a309640ad3c4be494e4157ad /libsolidity/analysis
parent0fcdafe2b5e122ef1c9acbadad9f309f015dfeac (diff)
downloaddexon-solidity-9f35f0b80571927ec89d77ec6827332c2ab60eba.tar.gz
dexon-solidity-9f35f0b80571927ec89d77ec6827332c2ab60eba.tar.zst
dexon-solidity-9f35f0b80571927ec89d77ec6827332c2ab60eba.zip
Disallow functions without implementation to use modifiers. This was already the case in the experimental 0.5.0 mode.
Diffstat (limited to 'libsolidity/analysis')
-rw-r--r--libsolidity/analysis/SyntaxChecker.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp
index 5d16a33f..77492499 100644
--- a/libsolidity/analysis/SyntaxChecker.cpp
+++ b/libsolidity/analysis/SyntaxChecker.cpp
@@ -213,8 +213,6 @@ bool SyntaxChecker::visit(ContractDefinition const& _contract)
bool SyntaxChecker::visit(FunctionDefinition const& _function)
{
- bool const v050 = m_sourceUnit->annotation().experimentalFeatures.count(ExperimentalFeature::V050);
-
if (_function.noVisibilitySpecified())
{
string suggestedVisibility = _function.isFallback() || m_isInterface ? "external" : "public";
@@ -225,12 +223,8 @@ bool SyntaxChecker::visit(FunctionDefinition const& _function)
}
if (!_function.isImplemented() && !_function.modifiers().empty())
- {
- if (v050)
- m_errorReporter.syntaxError(_function.location(), "Functions without implementation cannot have modifiers.");
- else
- m_errorReporter.warning(_function.location(), "Modifiers of functions without implementation are ignored." );
- }
+ m_errorReporter.syntaxError(_function.location(), "Functions without implementation cannot have modifiers.");
+
return true;
}