Seeing different behaviour in Jacoco coverage while using sealed class on kotlin 1.6.20 #1332
Labels
feedback pending
Further information is requested
reproducer required
Further information is requested
Projects
Steps to reproduce
Attached as a zip
jacocoReproducer.zip
Steps: (what exactly are you doing with the above reproducer?)
To generate the test reports execute
./gradlew kotlinjacocoTestReport
in the above reproducer.
Same can be run after changing the kotlin version in build.gradle file's plugin section
id 'org.jetbrains.kotlin.jvm' version '1.6.20'
Expected behaviour
For both kotlin 1.4.32 and 1.6.20 coverage should be same for sealed classes
Actual behaviour
For file PreviewScaleType.kt in the attached zip
Using sealed classes with parameterized constructor produces 3 methods for 1.4.32
For the same piece of code with kotlin 1.6.20 it produces 2 methods
The text was updated successfully, but these errors were encountered: