diff options
author | chriseth <c@ethdev.com> | 2015-04-21 16:59:48 +0800 |
---|---|---|
committer | chriseth <c@ethdev.com> | 2015-04-22 17:43:49 +0800 |
commit | a6d08950c6a81de3698ea8be01d2d5c472fe41e6 (patch) | |
tree | f1c74eb23c8e8cf351d08ea9c07682d78db1b0b5 /AST.cpp | |
parent | a44bcb6909478543151cac871fdbbc4909ad54aa (diff) | |
download | dexon-solidity-a6d08950c6a81de3698ea8be01d2d5c472fe41e6.tar dexon-solidity-a6d08950c6a81de3698ea8be01d2d5c472fe41e6.tar.gz dexon-solidity-a6d08950c6a81de3698ea8be01d2d5c472fe41e6.tar.bz2 dexon-solidity-a6d08950c6a81de3698ea8be01d2d5c472fe41e6.tar.lz dexon-solidity-a6d08950c6a81de3698ea8be01d2d5c472fe41e6.tar.xz dexon-solidity-a6d08950c6a81de3698ea8be01d2d5c472fe41e6.tar.zst dexon-solidity-a6d08950c6a81de3698ea8be01d2d5c472fe41e6.zip |
bytes parameters for events and sha3.
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -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<ModifierInvocation> const& modifier: m_functionModifiers) modifier->checkTypeRequirements(isConstructor() ? |