Skip to content

Commit a89262a

Browse files
committed
Added missed initial field states for arrays
1 parent e5024dc commit a89262a

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
@@ -28,11 +28,7 @@ import org.utbot.framework.fields.ModifiedFields
2828
import org.utbot.framework.fields.StateModificationInfo
2929
import org.utbot.framework.plugin.api.ClassId
3030
import org.utbot.framework.plugin.api.UtSymbolicExecution
31-
import org.utbot.framework.plugin.api.util.hasField
32-
import org.utbot.framework.plugin.api.util.id
33-
import org.utbot.framework.plugin.api.util.isArray
34-
import org.utbot.framework.plugin.api.util.isRefType
35-
import org.utbot.framework.plugin.api.util.objectClassId
31+
import org.utbot.framework.plugin.api.util.*
3632
import org.utbot.framework.util.hasThisInstance
3733
import org.utbot.fuzzer.UtFuzzedExecution
3834
import java.lang.reflect.Array
@@ -141,7 +137,7 @@ internal class CgFieldStateManagerImpl(val context: CgContext)
141137
emptyLineIfNeeded()
142138
val fields = when (state) {
143139
FieldState.INITIAL -> modifiedFields
144-
.filter { it.path.elements.isNotEmpty() && it.path.fieldType.isRefType }
140+
.filter { it.path.elements.isNotEmpty() && !it.path.fieldType.isPrimitive }
145141
.filter { needExpectedDeclaration(it.after) }
146142
FieldState.FINAL -> modifiedFields
147143
}

0 commit comments

Comments
 (0)