Generate hashCode()/equals(): Support deep array equality

#KT-19102 Fixed
This commit is contained in:
Alexey Sedunov
2018-06-08 19:25:34 +03:00
parent 9ef89447b3
commit c49eede054
4 changed files with 35 additions and 4 deletions
@@ -0,0 +1,18 @@
import java.util.Arrays
class EqKotlin(val a: Array<Array<String>>) {
<caret>override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false
other as EqKotlin
if (!Arrays.deepEquals(a, other.a)) return false
return true
}
override fun hashCode(): Int {
return Arrays.deepHashCode(a)
}
}