Skip to content

Commit b12a3d9

Browse files
committed
Little fixes
1 parent 063a637 commit b12a3d9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

utbot-framework/src/main/kotlin/org/utbot/framework/codegen/model/constructor/util/CgStatementConstructor.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ interface CgStatementConstructor {
118118
fun CgTryCatch.catch(exception: ClassId, init: (CgVariable) -> Unit): CgTryCatch
119119
fun CgTryCatch.finally(init: () -> Unit): CgTryCatch
120120

121-
fun CgExpression.isInstance(typeExpr: CgExpression): CgIsInstance
121+
fun CgExpression.isInstance(value: CgExpression): CgIsInstance
122122

123123
fun innerBlock(init: () -> Unit): CgInnerBlock
124124

@@ -306,12 +306,13 @@ internal class CgStatementConstructorImpl(context: CgContext) :
306306
return this.copy(finally = finallyBlock)
307307
}
308308

309-
override fun CgExpression.isInstance(typeExpr: CgExpression): CgIsInstance {
309+
override fun CgExpression.isInstance(value: CgExpression): CgIsInstance {
310310
require(this.type == classClassId) {
311311
"isInstance method can be called on object with type $classClassId only, but actual type is ${this.type}"
312312
}
313313

314-
return CgIsInstance(this, typeExpr)
314+
//TODO: we should better process it as this[isInstanceMethodId](value) as it is a call
315+
return CgIsInstance(this, value)
315316
}
316317

317318
override fun innerBlock(init: () -> Unit): CgInnerBlock =

0 commit comments

Comments
 (0)