Skip to content

Commit cde88e8

Browse files
committed
Added missed initial field states for arrays
1 parent 79e8381 commit cde88e8

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/tree/CgFieldStateManager.kt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,7 @@ import org.utbot.framework.fields.ModifiedFields
2626
import org.utbot.framework.fields.StateModificationInfo
2727
import org.utbot.framework.plugin.api.ClassId
2828
import org.utbot.framework.plugin.api.UtSymbolicExecution
29-
import org.utbot.framework.plugin.api.util.hasField
30-
import org.utbot.framework.plugin.api.util.id
31-
import org.utbot.framework.plugin.api.util.isArray
32-
import org.utbot.framework.plugin.api.util.isRefType
33-
import org.utbot.framework.plugin.api.util.objectClassId
29+
import org.utbot.framework.plugin.api.util.*
3430
import org.utbot.framework.util.hasThisInstance
3531
import org.utbot.fuzzer.UtFuzzedExecution
3632
import java.lang.reflect.Array
@@ -139,7 +135,7 @@ internal class CgFieldStateManagerImpl(val context: CgContext)
139135
emptyLineIfNeeded()
140136
val fields = when (state) {
141137
FieldState.INITIAL -> modifiedFields
142-
.filter { it.path.elements.isNotEmpty() && it.path.fieldType.isRefType }
138+
.filter { it.path.elements.isNotEmpty() && !it.path.fieldType.isPrimitive }
143139
.filter { needExpectedDeclaration(it.after) }
144140
FieldState.FINAL -> modifiedFields
145141
}

0 commit comments

Comments
 (0)