No coverage report for inlined Kotlin methods

后端 未结 2 1096
遥遥无期
遥遥无期 2021-01-11 15:30

Kotlin functions marked with inline keyword are, well, inlined during the compilation and it seems that code coverage tools (like JaCoCo) fail to prope

2条回答
  •  北海茫月
    2021-01-11 15:44

    I don't believe it is possible to turn off inlining since some functions may not make any sense if they are not inlined. These include functions with reified types (since the inlining creates the availability of type information) and functions with lambdas as parameters, since they can affect the control flow of the method they are inlined in.

提交回复
热议问题