aboutsummaryrefslogtreecommitdiffstats
path: root/AST.cpp
diff options
context:
space:
mode:
authorLefteris Karapetsas <lefteris@refu.co>2015-01-07 17:45:59 +0800
committerLefteris Karapetsas <lefteris@refu.co>2015-01-07 17:45:59 +0800
commitdf0dce584d2d1aacf3d33658b0540f243b3adb81 (patch)
tree3c5835c1a4337d20fbdd44fdaf80eebc59796398 /AST.cpp
parent24d7bdd3a9b9014e1e58dbe44f501fbfdec564c5 (diff)
downloaddexon-solidity-df0dce584d2d1aacf3d33658b0540f243b3adb81.tar
dexon-solidity-df0dce584d2d1aacf3d33658b0540f243b3adb81.tar.gz
dexon-solidity-df0dce584d2d1aacf3d33658b0540f243b3adb81.tar.bz2
dexon-solidity-df0dce584d2d1aacf3d33658b0540f243b3adb81.tar.lz
dexon-solidity-df0dce584d2d1aacf3d33658b0540f243b3adb81.tar.xz
dexon-solidity-df0dce584d2d1aacf3d33658b0540f243b3adb81.tar.zst
dexon-solidity-df0dce584d2d1aacf3d33658b0540f243b3adb81.zip
Small issues with Canonical Function Signature
- Also added an extra test
Diffstat (limited to 'AST.cpp')
-rw-r--r--AST.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/AST.cpp b/AST.cpp
index cdbfb4e9..0c56cb7a 100644
--- a/AST.cpp
+++ b/AST.cpp
@@ -110,14 +110,9 @@ void FunctionDefinition::checkTypeRequirements()
m_body->checkTypeRequirements();
}
-std::string FunctionDefinition::getCanonicalSignature()
+string FunctionDefinition::getCanonicalSignature() const
{
- auto parameters = getParameters();
- std::string ret = getName() + "(";
-
- for (auto it = parameters.cbegin(); it != parameters.cend(); ++it)
- ret += (*it)->getType()->toString() + (it + 1 == parameters.end() ? "" : ",");
- return ret + ")";
+ return getName() + FunctionType(*this).getCanonicalSignature();
}
void Block::checkTypeRequirements()