From a6d08950c6a81de3698ea8be01d2d5c472fe41e6 Mon Sep 17 00:00:00 2001 From: chriseth Date: Tue, 21 Apr 2015 10:59:48 +0200 Subject: bytes parameters for events and sha3. --- AST.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'AST.cpp') diff --git a/AST.cpp b/AST.cpp index 78b83d06..59a7b61c 100644 --- a/AST.cpp +++ b/AST.cpp @@ -450,14 +450,11 @@ void FunctionDefinition::checkTypeRequirements() { if (!var->getType()->canLiveOutsideStorage()) BOOST_THROW_EXCEPTION(var->createTypeError("Type is required to live outside storage.")); + // todo delete when will be implemented arrays as parameter type in internal functions + if (getVisibility() == Visibility::Public && var->getType()->getCategory() == Type::Category::Array) + BOOST_THROW_EXCEPTION(var->createTypeError("Arrays only implemented for external functions.")); if (getVisibility() >= Visibility::Public && !(var->getType()->externalType())) - { - // todo delete when will be implemented arrays as parameter type in internal functions - if (getVisibility() == Visibility::Public && var->getType()->getCategory() == Type::Category::Array) - BOOST_THROW_EXCEPTION(var->createTypeError("Arrays only implemented for external functions.")); - else - BOOST_THROW_EXCEPTION(var->createTypeError("Internal type is not allowed for public and external functions.")); - } + BOOST_THROW_EXCEPTION(var->createTypeError("Internal type is not allowed for public and external functions.")); } for (ASTPointer const& modifier: m_functionModifiers) modifier->checkTypeRequirements(isConstructor() ? -- cgit