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 {
fun <caret>equals(other: Any?) = false
fun hashCode() = 0
fun toString(): String {
return "A"
}
}
class B {
open fun equals(other: Any?) = false
open fun hashCode(): Int {
return 42
}
open fun toString() = ""
}
class C {
public fun equals(other: Any?): Boolean = true
public fun hashCode() = 0
public fun toString() = ""
}
class D {
public open fun equals(o: Any?) = false
public open fun hashCode(): Int = 239
public open fun toString() = ""
}