Skip to content

Kotlin inline functions are not marked as covered #654

@cplain

Description

@cplain

A similar issue was raised here for Jetbrains coverage tools:
https://youtrack.jetbrains.com/issue/KT-12605
with the ultimate resolution being tracked here:
https://youtrack.jetbrains.com/issue/IDEA-185485

Although the former ticket mentions raising an issue on this project as far as I could see none has been

Steps to reproduce

fun contrivedExample(condition: Boolean) {
    anInlineMethod(condition) { printLn("A thing happened") }
}

inline fun anInlineMethod(condition: Boolean, callback: () -> Unit) {
  if (condition) {
    callback.invoke()
  }
}

Expected behaviour

If I write a test with contrivedExample(condition = true), anInlineMethod should be considered covered

Actual behaviour

It isn't

JaCoCo version: 0.7.9
Operating system: macOS 10.13.2
Tool integration: Gradle

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions