JS: Remove unsupported Enumeration declaration.
Relates to #KT-7480
This commit is contained in:
@@ -3,11 +3,12 @@
|
||||
|
||||
package kotlin.collections
|
||||
|
||||
import java.util.Enumeration
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Creates an [Iterator] for an [Enumeration], allowing to use it in `for` loops.
|
||||
*/
|
||||
@kotlin.jvm.JvmVersion
|
||||
public operator fun <T> Enumeration<T>.iterator(): Iterator<T> = object : Iterator<T> {
|
||||
override fun hasNext(): Boolean = hasMoreElements()
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ public fun <T> Iterator<T>.asSequence(): Sequence<T> = Sequence { this }.constra
|
||||
/**
|
||||
* Creates a sequence that returns all values from this enumeration. The sequence is constrained to be iterated only once.
|
||||
*/
|
||||
@kotlin.jvm.JvmVersion
|
||||
@kotlin.internal.InlineOnly
|
||||
public inline fun<T> Enumeration<T>.asSequence(): Sequence<T> = this.iterator().asSequence()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user