Skip to content

Commit 653a8c8

Browse files
Refactor: inline property
1 parent 9af32d1 commit 653a8c8

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

utbot-framework/src/main/kotlin/org/utbot/engine/DataClasses.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,6 @@ data class MethodResult(
161161
val symbolicResult: SymbolicResult,
162162
val symbolicStateUpdate: SymbolicStateUpdate = SymbolicStateUpdate()
163163
) : InvokeResult() {
164-
val memoryUpdates by symbolicStateUpdate::memoryUpdates
165-
166164
constructor(
167165
symbolicResult: SymbolicResult,
168166
hardConstraints: HardConstraint = emptyHardConstraint(),

utbot-framework/src/main/kotlin/org/utbot/engine/Traverser.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -212,8 +212,6 @@ import java.lang.reflect.GenericArrayType
212212
import java.lang.reflect.TypeVariable
213213
import java.lang.reflect.WildcardType
214214
import java.util.concurrent.atomic.AtomicInteger
215-
import kotlin.reflect.full.instanceParameter
216-
import kotlin.reflect.jvm.javaType
217215

218216
private val CAUGHT_EXCEPTION = LocalVariable("@caughtexception")
219217

@@ -682,7 +680,7 @@ class Traverser(
682680
}
683681

684682
private fun isStaticInstanceInMethodResult(id: ClassId, methodResult: MethodResult?) =
685-
methodResult != null && id in methodResult.memoryUpdates.staticInstanceStorage
683+
methodResult != null && id in methodResult.symbolicStateUpdate.memoryUpdates.staticInstanceStorage
686684

687685
private fun TraversalContext.skipVerticesForThrowableCreation(current: JAssignStmt) {
688686
val rightType = current.rightOp.type as RefType
@@ -1030,7 +1028,6 @@ class Traverser(
10301028
*/
10311029
private fun updateGenericTypeInfo(identityRef: IdentityRef, value: ReferenceValue) {
10321030
val callable = methodUnderTest.executable
1033-
val kCallable = ::updateGenericTypeInfo
10341031
val type = if (identityRef is ThisRef) {
10351032
// TODO: for ThisRef both methods don't return parameterized type
10361033
if (methodUnderTest.isConstructor) {
@@ -2359,7 +2356,7 @@ class Traverser(
23592356
MethodResult(
23602357
mockValue,
23612358
hardConstraints = additionalConstraint.asHardConstraint(),
2362-
memoryUpdates = if (isInternalMock) MemoryUpdate() else mockMethodResult.memoryUpdates
2359+
memoryUpdates = if (isInternalMock) MemoryUpdate() else mockMethodResult.symbolicStateUpdate.memoryUpdates
23632360
)
23642361
)
23652362
}

0 commit comments

Comments
 (0)