Java 8 override restrictions: interface can't implement a method of 'Any'

- update Range and related classes
This commit is contained in:
Dmitry Petrov
2015-10-09 11:59:34 +03:00
parent 7e9e427d4c
commit ff1bf673ba
4 changed files with 20 additions and 2 deletions
@@ -62,6 +62,8 @@ class GenerateRanges(out: PrintWriter) : BuiltInsSourceGenerator(out) {
" }"
}
val toString = "\"\$start..\$end\""
out.println(
"""/**
* A range of values of type `$t`.
@@ -82,6 +84,8 @@ public class $range(override val start: $t, override val end: $t) : Range<$t>, P
override fun hashCode(): Int $hashCode
override fun toString(): String = $toString
companion object {
/** An empty range of values of type $t. */
public val EMPTY: $range = $range($emptyBounds)