File tree Expand file tree Collapse file tree
utbot-framework/src/main/kotlin/org/utbot/engine Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -346,10 +346,9 @@ class Resolver(
346346 /* *
347347 * Resolves current result (return value).
348348 */
349- fun resolveResult (symResult : SymbolicResult ? ): UtExecutionResult =
349+ fun resolveResult (symResult : SymbolicResult ): UtExecutionResult =
350350 withMemoryState(CURRENT ) {
351351 when (symResult) {
352- null -> UtExecutionSuccess (UtVoidModel )
353352 is SymbolicSuccess -> {
354353 collectMocksAndInstrumentation()
355354 val model = resolveModel(symResult.value)
Original file line number Diff line number Diff line change @@ -695,7 +695,7 @@ class Traverser(
695695 is JInvokeStmt -> traverseInvokeStmt(current)
696696 is SwitchStmt -> traverseSwitchStmt(current)
697697 is JReturnStmt -> processResult(current.symbolicSuccess())
698- is JReturnVoidStmt -> processResult(null )
698+ is JReturnVoidStmt -> processResult(SymbolicSuccess (voidValue) )
699699 is JRetStmt -> error(" This one should be already removed by Soot: $current " )
700700 is JThrowStmt -> traverseThrowStmt(current)
701701 is JBreakpointStmt -> pathSelector.offer(environment.state.updateQueued(globalGraph.succ(current)))
@@ -3649,7 +3649,7 @@ class Traverser(
36493649 )
36503650 }
36513651
3652- private suspend fun FlowCollector<UtResult>.processResult (symbolicResult : SymbolicResult ? /* null for void only: strange hack */ ) {
3652+ private suspend fun FlowCollector<UtResult>.processResult (symbolicResult : SymbolicResult ) {
36533653 val resolvedParameters = environment.state.parameters.map { it.value }
36543654
36553655 // choose types that have biggest priority
@@ -3703,9 +3703,8 @@ class Traverser(
37033703 } else {
37043704 MemoryUpdate () // all memory updates are already added in [environment.state]
37053705 }
3706- val symbolicResultOrVoid = symbolicResult ? : SymbolicSuccess (typeResolver.nullObject(VoidType .v()))
37073706 val methodResult = MethodResult (
3708- symbolicResultOrVoid ,
3707+ symbolicResult ,
37093708 queuedSymbolicStateUpdates + updates
37103709 )
37113710 val stateToOffer = environment.state.pop(methodResult)
You can’t perform that action at this time.
0 commit comments