Open klys-equinix opened 11 months ago
Hi, to understand the causes of the problem, we need additional information.
May you provide a compiled class-file for DrawCapOptionWithPrice
class? And give an example of the original source code of this class.
Which version of the compiler was used?
Source code:
data class DrawCapOptionWithPrice(
val rating: BandRating,
val cost: Cost,
val top: Boolean = false,
)
Class attached DrawCapOptionWithPrice.class.zip
Compiler: Azul Zulu SDK 17
Kotlin: 1.7.22
Thanks! Also XML report would be helpful
<class name="com/example/scx/common/DrawCapOptionWithPrice" sourcefilename="CommonValueObjects.kt">
<method name="<init>" desc="(Lcom/example/scx/common/BandRating;Lcom/example/scx/common/Cost;Z)V">
<counter type="INSTRUCTION" missed="0" covered="28"/>
<counter type="BRANCH" missed="1" covered="1"/>
<counter type="LINE" missed="0" covered="4"/>
</method>
Also, this is not an exception. It happens to many data classes. It seems to affect those data classes that have extension methods.
@losiu97, is this for Kover version 0.7.2
?
yes
@klys-equinix Unfortunately, I cannot reproduce your issue on my examples. Could you please share some more code? If your project is open-source, please share a link. Alternatively, it would be nice to have a small reproducer project. If it is impossible to reproduce with a small project, could you please share an example of an extension function for the class? (with bytecode preferably).
I tried reproducing this in a reproducer project, but i have not been able to see the same problems. I am at a loss why it happens in our main project. Unfortunetely, it would be hard to share the bytecode from that