Skip to content

Incorrect enum coverage issue in Kotlin 2.0 #621

@dungsil

Description

@dungsil

Describe the bug
A clear and concise description of what the bug is.

Coverage of enum classes is incorrectly calculated when using kover in Kotlin 2.0.

Errors
If present, stacktraces or files from build/kover/errors directory

N/A

Expected behavior
A clear and concise description of what you expected to happen.

Incorrect display of the last ‘}’ string in the Enum class

Kotlin 1.9.23 Kotlin 2.0.0
image image

Reproducer
A link to your project, if it is open source. Otherwise, please try to reproduce the problem on a small project.
If this is not feasible, give an example of the code on which the problem manifests itself.

Reports
If applicable, report files or screenshots.

Kotlin 1.9.23 Kotlin 2.0.0
image image

Environment

  • Kover Gradle Plugin version: 0.8.0
  • Gradle version: 8.7
  • Kotlin project type: Kotlin/JVM (Spring boot)
  • Coverage Toolset (if customized in build script): Kover
  • Other context important for this bug: Windows 11

Metadata

Metadata

Assignees

Labels

BugBug issue typeS: ready for releaseStatus: merged in the main branch

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions