diff options
author | chriseth <c@ethdev.com> | 2017-01-19 18:10:09 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2017-01-19 18:11:40 +0800 |
commit | 23a654ade8bb20fc2768e88b77059a14dce21635 (patch) | |
tree | bd271816f5861a19444d98ce37b963f8449b737a | |
parent | ba7dcbc15ef3ee900a4adc00e421983d6256c91c (diff) | |
download | dexon-solidity-23a654ade8bb20fc2768e88b77059a14dce21635.tar dexon-solidity-23a654ade8bb20fc2768e88b77059a14dce21635.tar.gz dexon-solidity-23a654ade8bb20fc2768e88b77059a14dce21635.tar.bz2 dexon-solidity-23a654ade8bb20fc2768e88b77059a14dce21635.tar.lz dexon-solidity-23a654ade8bb20fc2768e88b77059a14dce21635.tar.xz dexon-solidity-23a654ade8bb20fc2768e88b77059a14dce21635.tar.zst dexon-solidity-23a654ade8bb20fc2768e88b77059a14dce21635.zip |
Fix default function type name visibility.
-rw-r--r-- | libsolidity/analysis/ReferencesResolver.cpp | 1 | ||||
-rw-r--r-- | libsolidity/ast/AST.h | 5 |
2 files changed, 4 insertions, 2 deletions
diff --git a/libsolidity/analysis/ReferencesResolver.cpp b/libsolidity/analysis/ReferencesResolver.cpp index 66bf1d0e..df579c3d 100644 --- a/libsolidity/analysis/ReferencesResolver.cpp +++ b/libsolidity/analysis/ReferencesResolver.cpp @@ -87,7 +87,6 @@ void ReferencesResolver::endVisit(FunctionTypeName const& _typeName) { switch (_typeName.visibility()) { - case VariableDeclaration::Visibility::Default: case VariableDeclaration::Visibility::Internal: case VariableDeclaration::Visibility::External: break; diff --git a/libsolidity/ast/AST.h b/libsolidity/ast/AST.h index 4af64963..6e81892b 100644 --- a/libsolidity/ast/AST.h +++ b/libsolidity/ast/AST.h @@ -867,7 +867,10 @@ public: std::vector<ASTPointer<VariableDeclaration>> const& parameterTypes() const { return m_parameterTypes->parameters(); } std::vector<ASTPointer<VariableDeclaration>> const& returnParameterTypes() const { return m_returnTypes->parameters(); } - Declaration::Visibility visibility() const { return m_visibility; } + Declaration::Visibility visibility() const + { + return m_visibility == Declaration::Visibility::Default ? Declaration::Visibility::Internal : m_visibility; + } bool isDeclaredConst() const { return m_isDeclaredConst; } bool isPayable() const { return m_isPayable; } |