-
Notifications
You must be signed in to change notification settings - Fork 45
Closed
Labels
ctg-bugIssue is a bugIssue is a buglang-kotlinIssue is related to Kotlin language supportIssue is related to Kotlin language support
Description
Description
In case tests are generated for Kotlin file then no error list is displayed at the end of test generation.
To Reproduce
Steps to reproduce the behavior:
class SimpleFunctions {
fun div(x: Int, y: Int) = x / y
}- Enable 'Display detected errors on the Problems tool window' in UTBot settings
- Generate code for Kotlin code above
Expected behavior
Tests are generated. Problems view has been opened with detected errors
Actual behavior
Tests are generated, but 'Problems view' is not opened and following message is shown:

Additional context
Problem reproducible no matter what target language is Kotlin or Java.
SARIF report is generated and contains some errors.
In case user switched to another project till generation is finished then exception is thrown at the end of test generation.
java.lang.Throwable: Non-physical PsiElement. Physical element is required to be able to anchor the problem in the source tree: PsiFile:ListSample.kt; parent: PsiDirectory:C:\Users\t00814305\IdeaProjects\Kotlin\UTBotJavaSamples\src\main\kotlin\org\utbot\examples\collections; file: PsiFile:ListSample.kt
at com.intellij.openapi.diagnostic.Logger.error(Logger.java:182)
at com.intellij.codeInspection.ProblemDescriptorBase.assertPhysical(ProblemDescriptorBase.java:115)
at com.intellij.codeInspection.ProblemDescriptorBase.<init>(ProblemDescriptorBase.java:54)
at com.intellij.codeInspection.InspectionManagerBase.createProblemDescriptor(InspectionManagerBase.java:105)
at org.utbot.intellij.plugin.inspection.UnitTestBotInspectionTool.checkFile(UnitTestBotInspectionTool.kt:84)
Metadata
Metadata
Assignees
Labels
ctg-bugIssue is a bugIssue is a buglang-kotlinIssue is related to Kotlin language supportIssue is related to Kotlin language support
Type
Projects
Status
Done