added test case for KT-2354
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
package foo
|
||||
|
||||
class Foo(val name: String) {
|
||||
public fun equals(that: Foo): Boolean {
|
||||
return this.name == that.name
|
||||
}
|
||||
}
|
||||
|
||||
fun box() : Boolean {
|
||||
val a = Foo("abc")
|
||||
val b = Foo("abc")
|
||||
val c = Foo("def")
|
||||
|
||||
if (a != b) return false
|
||||
if (a == c) return false
|
||||
|
||||
return true
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package foo
|
||||
|
||||
fun box() : Boolean {
|
||||
val a = "abc"
|
||||
val b = "abc"
|
||||
val c = "def"
|
||||
|
||||
if (a != b) return false
|
||||
if (a == c) return false
|
||||
|
||||
return true
|
||||
}
|
||||
Reference in New Issue
Block a user