Fix exception on 'equals()' returning 'Nothing' in inline class

^KT-54401: Fixed
This commit is contained in:
vladislav.grechko
2022-10-13 18:40:58 +02:00
committed by teamcity
parent 4c6b433496
commit cc1b4243dd
3 changed files with 10 additions and 8 deletions
@@ -28,6 +28,11 @@ value class IC3(val value: Int) {
}
OPTIONAL_JVM_INLINE_ANNOTATION
value class IC4(val value: Int) {
override fun equals(other: Any?) = TODO()
}
fun box() =
if (IC1(1.0) == IC1(1.05) && IC1(1.0) != IC1(1.2)
&& IC2(5) == IC2(6) && IC2(5) != IC2(7)