diff options
author | Alex Beregszaszi <alex@rtfs.hu> | 2018-04-03 22:15:36 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-03 22:15:36 +0800 |
commit | 7753249f646f239819c62ab6847438dc84b6e04b (patch) | |
tree | b209000917d198d897d078c0eb7ecf47d704bf30 /libsolidity/analysis/SyntaxChecker.cpp | |
parent | 19f288774112c64331b55aca0f6519452dea2c74 (diff) | |
parent | f9efa417492916546d23115da7a55e86090d47dd (diff) | |
download | dexon-solidity-7753249f646f239819c62ab6847438dc84b6e04b.tar dexon-solidity-7753249f646f239819c62ab6847438dc84b6e04b.tar.gz dexon-solidity-7753249f646f239819c62ab6847438dc84b6e04b.tar.bz2 dexon-solidity-7753249f646f239819c62ab6847438dc84b6e04b.tar.lz dexon-solidity-7753249f646f239819c62ab6847438dc84b6e04b.tar.xz dexon-solidity-7753249f646f239819c62ab6847438dc84b6e04b.tar.zst dexon-solidity-7753249f646f239819c62ab6847438dc84b6e04b.zip |
Merge pull request #3699 from ethereum/interfaceExternalVisibility
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 3a32810b..b595c4d1 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; } |