Custom equals operator (includes little patch to frontend)
#KT-2354 fixed
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
package foo
|
||||
|
||||
class Foo(val name: String) {
|
||||
public fun equals(that: Foo): Boolean {
|
||||
return this.name == that.name
|
||||
}
|
||||
public fun equals(that: Any?): Boolean {
|
||||
if (that !is Foo) {
|
||||
return false
|
||||
}
|
||||
return this.name == that.name
|
||||
}
|
||||
}
|
||||
|
||||
fun box() : Boolean {
|
||||
|
||||
Reference in New Issue
Block a user