diff --git a/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/tree/ConstructorUtils.kt b/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/tree/ConstructorUtils.kt index 03a078cc03..f9007a3200 100644 --- a/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/tree/ConstructorUtils.kt +++ b/utbot-framework/src/main/kotlin/org/utbot/framework/codegen/tree/ConstructorUtils.kt @@ -342,8 +342,9 @@ internal fun ClassId.getAmbiguousOverloadsOf(executableId: ExecutableId): Sequen is ConstructorId -> allConstructors } + // We should take here not only declared methods but also inherited return allExecutables.filter { - it.name == executableId.name && it.parameters.size == executableId.executable.parameters.size && it.classId == executableId.classId + it.name == executableId.name && it.parameters.size == executableId.executable.parameters.size } }