File tree Expand file tree Collapse file tree 1 file changed +14
-2
lines changed
utbot-framework/src/main/kotlin/org/utbot/framework/assemble Expand file tree Collapse file tree 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -187,8 +187,8 @@ class AssembleModelGenerator(private val basePackageName: String) {
187187 is UtPrimitiveModel ,
188188 is UtClassRefModel ,
189189 is UtVoidModel ,
190- is UtEnumConstantModel ,
191- is UtLambdaModel -> utModel
190+ is UtEnumConstantModel -> utModel
191+ is UtLambdaModel -> assembleLambdaModel( utModel)
192192 is UtArrayModel -> assembleArrayModel(utModel)
193193 is UtCompositeModel -> assembleCompositeModel(utModel)
194194 is UtAssembleModel -> assembleAssembleModel(utModel)
@@ -204,6 +204,18 @@ class AssembleModelGenerator(private val basePackageName: String) {
204204 return assembledModel
205205 }
206206
207+ private fun assembleLambdaModel (lambdaModel : UtLambdaModel ): UtModel {
208+ instantiatedModels[lambdaModel]?.let { return it }
209+
210+ return UtLambdaModel (
211+ lambdaModel.id,
212+ lambdaModel.samType,
213+ lambdaModel.declaringClass,
214+ lambdaModel.lambdaName,
215+ capturedValues = lambdaModel.capturedValues.map { assembleModel(it) }.toMutableList(),
216+ )
217+ }
218+
207219 /* *
208220 * Assembles internal structure of [UtArrayModel].
209221 */
You can’t perform that action at this time.
0 commit comments