File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
usvm-ts/src/main/kotlin/org/usvm/machine/expr Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -1160,13 +1160,24 @@ class TsSimpleValueResolver(
11601160 }
11611161
11621162 if (local.name.startsWith(ANONYMOUS_METHOD_PREFIX )) {
1163+ val currentMethod = scope.calcOnState { lastEnteredMethod }
11631164 val sig = EtsMethodSignature (
1164- enclosingClass = EtsClassSignature . UNKNOWN ,
1165+ enclosingClass = currentMethod.signature.enclosingClass ,
11651166 name = local.name,
11661167 parameters = emptyList(),
11671168 returnType = EtsUnknownType ,
11681169 )
11691170 val methods = ctx.resolveEtsMethods(sig)
1171+ if (methods.isEmpty()) {
1172+ logger.error { " Cannot resolve anonymous method for local: $local " }
1173+ scope.assert (ctx.mkFalse())
1174+ return null
1175+ }
1176+ if (methods.size > 1 ) {
1177+ logger.error { " Multiple methods found for anonymous method local: $local " }
1178+ scope.assert (ctx.mkFalse())
1179+ return null
1180+ }
11701181 val method = methods.single()
11711182 val ref = scope.calcOnState { getMethodRef(method) }
11721183 return ref
You can’t perform that action at this time.
0 commit comments