aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorLiana Husikyan <liana@ethdev.com>2015-03-24 01:08:45 +0800
committerLiana Husikyan <liana@ethdev.com>2015-03-25 20:59:46 +0800
commit701b34fbeb1bd08445aad55f82672d35343f5a44 (patch)
treec279a47bba724163fc3f5d78e5a8f1742be4e45e /AST.cpp
parente3ea90e997caf1d316252ad16ecb14c4d6163da5 (diff)
downloaddexon-solidity-701b34fbeb1bd08445aad55f82672d35343f5a44.tar.gz
dexon-solidity-701b34fbeb1bd08445aad55f82672d35343f5a44.tar.zst
dexon-solidity-701b34fbeb1bd08445aad55f82672d35343f5a44.zip
renamed getCanonicalSignature
added externalTypes instead of types for interface functions added simple test todo testing
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/AST.cpp b/AST.cpp
index 63f3d772..2e24d4f9 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -88,7 +88,7 @@ void ContractDefinition::checkTypeRequirements()
if (hashes.count(hash))
BOOST_THROW_EXCEPTION(createTypeError(
std::string("Function signature hash collision for ") +
- it.second->getCanonicalSignature()));
+ it.second->externalTypes()));
hashes.insert(hash);
}
}
@@ -192,7 +192,7 @@ vector<pair<FixedHash<4>, FunctionTypePointer>> const& ContractDefinition::getIn
if (functionsSeen.count(f->getName()) == 0 && f->isPartOfExternalInterface())
{
functionsSeen.insert(f->getName());
- FixedHash<4> hash(dev::sha3(f->getCanonicalSignature()));
+ FixedHash<4> hash(dev::sha3(f->externalTypes()));
m_interfaceFunctionList->push_back(make_pair(hash, make_shared<FunctionType>(*f, false)));
}
@@ -200,8 +200,9 @@ vector<pair<FixedHash<4>, FunctionTypePointer>> const& ContractDefinition::getIn
if (functionsSeen.count(v->getName()) == 0 && v->isPartOfExternalInterface())
{
FunctionType ftype(*v);
+ solAssert(v->getType().get(), "");
functionsSeen.insert(v->getName());
- FixedHash<4> hash(dev::sha3(ftype.getCanonicalSignature(v->getName())));
+ FixedHash<4> hash(dev::sha3(ftype.externalTypes(v->getName())));
m_interfaceFunctionList->push_back(make_pair(hash, make_shared<FunctionType>(*v)));
}
}
@@ -319,9 +320,9 @@ void FunctionDefinition::checkTypeRequirements()
m_body->checkTypeRequirements();
}
-string FunctionDefinition::getCanonicalSignature() const
+string FunctionDefinition::externalTypes() const
{
- return FunctionType(*this).getCanonicalSignature(getName());
+ return FunctionType(*this).externalTypes(getName());
}
bool VariableDeclaration::isLValue() const