JS: Remove unsupported Enumeration declaration.
Relates to #KT-7480
This commit is contained in:
@@ -122,12 +122,6 @@ public open class LinkedHashMap<K, V>(
|
||||
@library
|
||||
public open class NoSuchElementException(message: String? = null) : Exception() {}
|
||||
|
||||
@library
|
||||
public interface Enumeration<E> {
|
||||
public fun hasMoreElements(): Boolean
|
||||
public fun nextElement(): E
|
||||
}
|
||||
|
||||
@native
|
||||
public class Date() {
|
||||
public fun getTime(): Int = noImpl
|
||||
|
||||
@@ -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