Quickfix to add 'override' to equals, hashCode, toString in project

To help users migrate to the newest Kotlin version in two clicks
This commit is contained in:
Alexander Udalov
2014-02-07 18:25:33 +04:00
parent 774e5f0535
commit b2d074c5cc
7 changed files with 179 additions and 1 deletions
@@ -0,0 +1,29 @@
// "Add 'override' to equals, hashCode, toString in project" "true"
class A {
override fun equals(other: Any?) = false
override fun hashCode() = 0
override fun toString(): String {
return "A"
}
}
class B {
override fun equals(other: Any?) = false
override fun hashCode(): Int {
return 42
}
override fun toString() = ""
}
class C {
override fun equals(other: Any?): Boolean = true
override fun hashCode() = 0
override fun toString() = ""
}
class D {
override fun equals(o: Any?) = false
override fun hashCode(): Int = 239
override fun toString() = ""
}