aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorErik Kundt <bitshift@posteo.org>2018-07-05 00:04:44 +0800
committerErik Kundt <bitshift@posteo.org>2018-07-17 23:44:51 +0800
commitb5ecfbe5bc2afdf8f42ec67715794aefad9dfe0f (patch)
treefc949d51bb2f84b08072ea75cae070343e875661 /libsolidity
parent1d33f41c1ab96746b97b97f79732ec23759fb8f0 (diff)
downloaddexon-solidity-b5ecfbe5bc2afdf8f42ec67715794aefad9dfe0f.tar
dexon-solidity-b5ecfbe5bc2afdf8f42ec67715794aefad9dfe0f.tar.gz
dexon-solidity-b5ecfbe5bc2afdf8f42ec67715794aefad9dfe0f.tar.bz2
dexon-solidity-b5ecfbe5bc2afdf8f42ec67715794aefad9dfe0f.tar.lz
dexon-solidity-b5ecfbe5bc2afdf8f42ec67715794aefad9dfe0f.tar.xz
dexon-solidity-b5ecfbe5bc2afdf8f42ec67715794aefad9dfe0f.tar.zst
dexon-solidity-b5ecfbe5bc2afdf8f42ec67715794aefad9dfe0f.zip
Enforces visibility specifier and updates docs.
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/analysis/StaticAnalyzer.cpp10
-rw-r--r--libsolidity/analysis/SyntaxChecker.cpp2
2 files changed, 1 insertions, 11 deletions
diff --git a/libsolidity/analysis/StaticAnalyzer.cpp b/libsolidity/analysis/StaticAnalyzer.cpp
index 323282ca..60a58665 100644
--- a/libsolidity/analysis/StaticAnalyzer.cpp
+++ b/libsolidity/analysis/StaticAnalyzer.cpp
@@ -51,16 +51,6 @@ void StaticAnalyzer::endVisit(ContractDefinition const&)
bool StaticAnalyzer::visit(FunctionDefinition const& _function)
{
- const bool isInterface = m_currentContract->contractKind() == ContractDefinition::ContractKind::Interface;
-
- if (_function.noVisibilitySpecified())
- m_errorReporter.warning(
- _function.location(),
- "No visibility specified. Defaulting to \"" +
- Declaration::visibilityToString(_function.visibility()) +
- "\"." +
- (isInterface ? " In interfaces it defaults to external." : "")
- );
if (_function.isImplemented())
m_currentFunction = &_function;
else
diff --git a/libsolidity/analysis/SyntaxChecker.cpp b/libsolidity/analysis/SyntaxChecker.cpp
index fba18a45..234c177c 100644
--- a/libsolidity/analysis/SyntaxChecker.cpp
+++ b/libsolidity/analysis/SyntaxChecker.cpp
@@ -201,7 +201,7 @@ bool SyntaxChecker::visit(FunctionDefinition const& _function)
{
bool const v050 = m_sourceUnit->annotation().experimentalFeatures.count(ExperimentalFeature::V050);
- if (v050 && _function.noVisibilitySpecified())
+ if (_function.noVisibilitySpecified())
m_errorReporter.syntaxError(_function.location(), "No visibility specified.");
if (_function.isOldStyleConstructor())