aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-03-30 23:18:38 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-03-30 23:18:38 +0800
commitc6781ed38dd7c634ef8dbbbebcac582451c04ddd (patch)
tree56502cc00f7150eb5bc30d4ba5141e18003d143e /AST.cpp
parent85bb056993ccb111b7e32e28475b906f75b77aa6 (diff)
downloaddexon-solidity-c6781ed38dd7c634ef8dbbbebcac582451c04ddd.tar.gz
dexon-solidity-c6781ed38dd7c634ef8dbbbebcac582451c04ddd.tar.zst
dexon-solidity-c6781ed38dd7c634ef8dbbbebcac582451c04ddd.zip
Fix some styling issues and remove comments
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp18
1 files changed, 2 insertions, 16 deletions
diff --git a/AST.cpp b/AST.cpp
index 2ada7362..db72ea65 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -136,34 +136,20 @@ void ContractDefinition::checkAbstractFunctions()
// Search from base to derived
for (ContractDefinition const* contract: boost::adaptors::reverse(getLinearizedBaseContracts()))
- {
for (ASTPointer<FunctionDefinition> const& function: contract->getDefinedFunctions())
{
string const& name = function->getName();
if (!function->isFullyImplemented() && functions.count(name) && functions[name])
BOOST_THROW_EXCEPTION(function->createTypeError("Redeclaring an already implemented function as abstract"));
- // if (functions.count(name) && !functions[name] && function->isFullyImplemented())
- // functions.insert(make_pair(name, true);
-
- // if (functions.count(name) && !functions[name] && function->isFullyImplemented)
- // functions.insert(make_pair(name, true));
-
- // functions.insert(make_pair(name, function->isFullyImplemented()));
functions[name] = function->isFullyImplemented();
-
- // if (function->isFullyImplemented())
- // full_functions.insert(make_pair(name, function.get()));
- // else
- // abs_functions.insert(make_pair(name, function.get()));
}
- }
+
for (auto const& it: functions)
if (!it.second)
{
setFullyImplemented(false);
break;
}
-
}
void ContractDefinition::checkIllegalOverrides() const
@@ -682,7 +668,7 @@ void NewExpression::checkTypeRequirements()
if (!m_contract)
BOOST_THROW_EXCEPTION(createTypeError("Identifier is not a contract."));
if (!m_contract->isFullyImplemented())
- BOOST_THROW_EXCEPTION(m_contract->createTypeError("Trying to create an object of an abstract contract."));
+ BOOST_THROW_EXCEPTION(m_contract->createTypeError("Trying to create an instance of an abstract contract."));
shared_ptr<ContractType const> contractType = make_shared<ContractType>(*m_contract);
TypePointers const& parameterTypes = contractType->getConstructorType()->getParameterTypes();
m_type = make_shared<FunctionType>(parameterTypes, TypePointers{contractType},