Merge pull request #1587 from ethereum/fixFunctionVisibility

Fix default function type name visibility.
This commit is contained in:
Yoichi Hirai 2017-01-19 16:24:25 +01:00 committed by GitHub
commit 09403dd5ed
2 changed files with 4 additions and 2 deletions

View File

@ -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;

View File

@ -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; }