KT-MR-7307 review fixes

This commit is contained in:
vladislav.grechko
2022-10-12 17:27:00 +02:00
committed by teamcity
parent 4348878aab
commit 817afcd4af
24 changed files with 118 additions and 49 deletions
@@ -0,0 +1,28 @@
// FIR_IDENTICAL
// WITH_STDLIB
// !DIAGNOSTICS: -DEBUG_INFO_SMARTCAST
// LANGUAGE: +CustomEqualsInInlineClasses
@JvmInline
value class IC1(val x: Int) {
override fun <!INEFFICIENT_EQUALS_OVERRIDING_IN_INLINE_CLASS!>equals<!>(other: Any?): Boolean {
if (other !is IC1) {
return false
}
return x == other.x
}
}
@JvmInline
value class IC2(val x: Int) {
override fun hashCode() = 0
}
@JvmInline
value class IC3(val x: Int) {
override fun equals(other: Any?) = true
fun equals(other: IC3) = true
override fun hashCode() = 0
}