Skip to content

Commit 17c9166

Browse files
committed
Cleanup
1 parent 0ed5626 commit 17c9166

5 files changed

Lines changed: 4 additions & 9 deletions

File tree

usvm-ts/src/main/kotlin/org/usvm/machine/expr/WriteLocal.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ internal fun TsExprResolver.handleAssignToLocal(
1717
return assignToLocal(scope, local, expr)
1818
}
1919

20-
internal fun TsContext. assignToLocal(
20+
internal fun TsContext.assignToLocal(
2121
scope: TsStepScope,
2222
local: EtsLocal,
2323
expr: UExpr<*>,

usvm-ts/src/main/kotlin/org/usvm/machine/state/TsMethodResult.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import org.jacodb.ets.model.EtsMethod
44
import org.jacodb.ets.model.EtsMethodSignature
55
import org.jacodb.ets.model.EtsType
66
import org.usvm.UExpr
7-
import org.usvm.UHeapRef
87

98
/**
109
* Represents a result of a method invocation.

usvm-ts/src/main/kotlin/org/usvm/machine/state/TsStateUtils.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package org.usvm.machine.state
22

33
import org.jacodb.ets.model.EtsMethod
44
import org.jacodb.ets.model.EtsStmt
5-
import org.jacodb.ets.utils.getDeclaredLocals
65
import org.usvm.UExpr
76
import org.usvm.USort
87

usvm-ts/src/main/kotlin/org/usvm/machine/types/TsTypeSystem.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,8 +250,7 @@ class TsTypeSystem(
250250
}
251251

252252
override fun isInstantiable(type: EtsType): Boolean {
253-
val t = unwrapAlias(type)
254-
return when (t) {
253+
return when (val t = unwrapAlias(type)) {
255254
is EtsNeverType -> false // no runtime value
256255
is EtsAnyType,
257256
is EtsUnknownType,
@@ -272,8 +271,7 @@ class TsTypeSystem(
272271
}
273272

274273
override fun findSubtypes(type: EtsType): Sequence<EtsType> {
275-
val t = unwrapAlias(type)
276-
return when (t) {
274+
return when (val t = unwrapAlias(type)) {
277275
is EtsPrimitiveType -> emptySequence()
278276
is EtsAnyType,
279277
is EtsUnknownType,

usvm-ts/src/main/kotlin/org/usvm/util/EtsFieldResolver.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ fun TsContext.resolveEtsField(
3535

3636
// Unknown signature:
3737
if (instance != null) {
38-
val instanceType = instance.type
39-
when (instanceType) {
38+
when (val instanceType = instance.type) {
4039
is EtsClassType -> {
4140
val field = tryGetSingleField(scene, instanceType.signature.name, field.name, hierarchy)
4241
if (field != null) return TsResolutionResult.create(field)

0 commit comments

Comments
 (0)