diff options
author | Liana Husikyan <liana@ethdev.com> | 2015-03-20 20:30:00 +0800 |
---|---|---|
committer | Liana Husikyan <liana@ethdev.com> | 2015-03-25 20:59:39 +0800 |
commit | 011d95e7e348908b1027dea922a429517cdebf07 (patch) | |
tree | 01dbc166bc693e56a23e0d9bf7f83b7652483690 /AST.cpp | |
parent | 60204d593e48d2f4395a34c3e7bb010d4f40e513 (diff) | |
download | dexon-solidity-011d95e7e348908b1027dea922a429517cdebf07.tar dexon-solidity-011d95e7e348908b1027dea922a429517cdebf07.tar.gz dexon-solidity-011d95e7e348908b1027dea922a429517cdebf07.tar.bz2 dexon-solidity-011d95e7e348908b1027dea922a429517cdebf07.tar.lz dexon-solidity-011d95e7e348908b1027dea922a429517cdebf07.tar.xz dexon-solidity-011d95e7e348908b1027dea922a429517cdebf07.tar.zst dexon-solidity-011d95e7e348908b1027dea922a429517cdebf07.zip |
- added externalType to BooleanType.
- fixed the error message
Diffstat (limited to 'AST.cpp')
-rw-r--r-- | AST.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -308,8 +308,8 @@ 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::Internal) - BOOST_THROW_EXCEPTION(var->createTypeError("Type is required to have an external address.")); + if (!var->getType()->externalType() && getVisibility() >= Visibility::Public) + BOOST_THROW_EXCEPTION(var->createTypeError("Internal type is not allowed for function with external visibility")); } for (ASTPointer<ModifierInvocation> const& modifier: m_functionModifiers) modifier->checkTypeRequirements(isConstructor() ? @@ -659,7 +659,7 @@ void MemberAccess::checkTypeRequirements() "visible in " + type.toString())); //todo check for visibility // else if (!m_type->externalType()) -// BOOST_THROW_EXCEPTION(createTypeError("Type is required to have an external address.")); +// BOOST_THROW_EXCEPTION(createTypeError("Internal type not allowed for function with external visibility")); // This should probably move somewhere else. if (type.getCategory() == Type::Category::Struct) |