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

This commit is contained in:
Mathias Baumann 2020-11-18 18:24:33 +01:00 committed by Kamil Śliwak
parent 529495c530
commit 64d14b4cc4

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());
}