added test case for KT-2354

This commit is contained in:
James Strachan
2012-07-03 13:55:49 +01:00
parent 32e73c10b1
commit 25bf753369
6 changed files with 98 additions and 1 deletions
@@ -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
}