aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/AST.cpp b/AST.cpp
index e3c9bc96..7fe3a982 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -337,7 +337,7 @@ void FunctionDefinition::checkTypeRequirements()
{
if (!var->getType()->canLiveOutsideStorage())
BOOST_THROW_EXCEPTION(var->createTypeError("Type is required to live outside storage."));
- if (!(var->getType()->externalType()) && getVisibility() >= Visibility::Public)
+ if (getVisibility() >= Visibility::Public && !(var->getType()->externalType()))
BOOST_THROW_EXCEPTION(var->createTypeError("Internal type is not allowed for function with external visibility"));
}
for (ASTPointer<ModifierInvocation> const& modifier: m_functionModifiers)