Skip to content

Commit 3d9be9b

Browse files
committed
Fix modificationsChain mapping when removing UtilMethodProviderPlaceholder
1 parent 8360415 commit 3d9be9b

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/domain/builtin/UtilMethodProviderPlaceholder.kt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,10 @@ val utilClassIdPlaceholder = utJavaUtilsClassId
2020
object UtilMethodProviderPlaceholder : UtilMethodProvider(utilClassIdPlaceholder)
2121

2222
fun UtModel.shallowlyFixUtilClassIds(actualUtilClassId: ClassId) = when (this) {
23-
is UtAssembleModel -> UtAssembleModel(
24-
id = id,
25-
classId = classId,
26-
modelName = modelName,
27-
instantiationCall = instantiationCall.shallowlyFixUtilClassId(actualUtilClassId),
28-
origin = origin,
29-
modificationsChainProvider = { modificationsChain.map { it.shallowlyFixUtilClassId(actualUtilClassId) } }
23+
is UtAssembleModel -> copy(
24+
modificationsChain = modificationsChain.map { statement ->
25+
statement.shallowlyFixUtilClassId(actualUtilClassId)
26+
}
3027
)
3128
else -> this
3229
}

0 commit comments

Comments
 (0)