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

This commit is contained in:
Mathias Baumann authored and Kamil Śliwak committed 2021-02-23 10:29:12 +01:00
1 parent 529495c530
commit 64d14b4cc4
1 file changed
+3
+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());
}