Delete Hashable, pull up its members to Any
Extensions on nullable types remain in Library.kt #KT-1741 Obsolete #KT-2805 Obsolete #KT-1365 Fixed #KT-4517 In Progress
This commit is contained in:
@@ -71,10 +71,10 @@ class GenerateProgressions(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
||||
|
||||
override fun iterator(): ${t}Iterator = ${t}ProgressionIterator(start, end, increment)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
override fun equals(other: Any?): Boolean =
|
||||
other is $progression && ${compare("start")} && ${compare("end")} && ${compare("increment")}
|
||||
|
||||
fun hashCode(): Int $hashCode
|
||||
override fun hashCode(): Int $hashCode
|
||||
|
||||
fun toString(): String = ${"if (increment > 0) \"\$start..\$end step \$increment\" else \"\$start downTo \$end step \${-increment}\""}
|
||||
}""")
|
||||
|
||||
@@ -66,10 +66,10 @@ class GenerateRanges(out: PrintWriter) : BuiltInsSourceGenerator(out) {
|
||||
|
||||
override fun iterator(): ${t}Iterator = ${t}ProgressionIterator(start, end, $increment)
|
||||
|
||||
fun equals(other: Any?): Boolean =
|
||||
override fun equals(other: Any?): Boolean =
|
||||
other is $range && ${compare("start")} && ${compare("end")}
|
||||
|
||||
fun hashCode(): Int $hashCode
|
||||
override fun hashCode(): Int $hashCode
|
||||
|
||||
class object {
|
||||
public val EMPTY: $range = $range($emptyBounds)
|
||||
|
||||
Reference in New Issue
Block a user