-
Notifications
You must be signed in to change notification settings - Fork 0
Lateinit unreachable code #5
base: master
Are you sure you want to change the base?
Conversation
Rework to be compatible with all variants from 1.4.0 to 1.6.0. The different versions of the Kotlin compiler generate slightly different versions of the check that leads to throwing an 1.4.0Doesn't differentiate, always produces the same byte code:
1.5.0differentiates between private and public lateinit properties:
1.5.30differentiates between private and public, and between generic and non-generic lateinit properties
1.6.0differentiates between private and public, and between generic and non-generic lateinit properties (like 1.5.30), but changed the byte code for the private variants
It can be expected, that later versions of Kotlin 1.6 will apply the same |
1.7.21Adds a new Frame instruction to all variants:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Release 0.8.11
JaCoCo is reporting missing coverage for Kotlin (v1.5.30)
lateinit
properties.The Kotlin compiler generates an uncover-able branch for
lateinit
properties. The compiler behaves differently given the following examples:Example 1.
which generates the following:
Example 2.
which generates the following:
Example 3.
In this PR the
lateinit
filter is extended to also filter the scenarios described.