diff options
author | bitshift <bitshift@posteo.org> | 2018-03-10 00:38:17 +0800 |
---|---|---|
committer | Erik Kundt <bitshift@posteo.org> | 2018-04-03 17:16:44 +0800 |
commit | 8fe1cfb12ef49a74eaebed56d160e88cfd9a4de2 (patch) | |
tree | d7c39e5619dffb37bce2856daa1f9620493a1af5 /libsolidity/analysis/SyntaxChecker.cpp | |
parent | 3bb54e8bd5ea75bd52d2eca43fd438f8e894a2de (diff) | |
download | dexon-solidity-8fe1cfb12ef49a74eaebed56d160e88cfd9a4de2.tar.gz dexon-solidity-8fe1cfb12ef49a74eaebed56d160e88cfd9a4de2.tar.zst dexon-solidity-8fe1cfb12ef49a74eaebed56d160e88cfd9a4de2.zip |
Defaults to external visibility for interfaces.
Diffstat (limited to 'libsolidity/analysis/SyntaxChecker.cpp')
-rw-r--r-- | libsolidity/analysis/SyntaxChecker.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp index ddac194b..5de9a270 100644 --- a/libsolidity/analysis/SyntaxChecker.cpp +++ b/libsolidity/analysis/SyntaxChecker.cpp @@ -214,18 +214,9 @@ bool SyntaxChecker::visit(FunctionDefinition const& _function) { bool const v050 = m_sourceUnit->annotation().experimentalFeatures.count(ExperimentalFeature::V050); - if (_function.noVisibilitySpecified()) - { - if (v050) - m_errorReporter.syntaxError(_function.location(), "No visibility specified."); - else - m_errorReporter.warning( - _function.location(), - "No visibility specified. Defaulting to \"" + - Declaration::visibilityToString(_function.visibility()) + - "\"." - ); - } + if (v050 && _function.noVisibilitySpecified()) + m_errorReporter.syntaxError(_function.location(), "No visibility specified."); + return true; } |