IRNames::function(): Return correct name if the function is a constructor

This commit is contained in:
Mathias Baumann
2021-02-23 10:29:12 +01:00
committed by Kamil Śliwak
parent 529495c530
commit 64d14b4cc4
+3
View File
@@ -35,6 +35,9 @@ YulArity YulArity::fromType(FunctionType const& _functionType)
string IRNames::function(FunctionDefinition const& _function)
{
if (_function.isConstructor())
return implicitConstructor(*_function.annotation().contract);
return "fun_" + _function.name() + "_" + to_string(_function.id());
}