Add explicit imports of kotlin.ranges more specific functions
The extensions 'contains' and 'reversed' from kotlin.ranges can be more specific for IntRange, LongRange, etc than the same functions from kotlin.collections, yet they lose in overload resolution to the latter ones when invoked from kotlin.collections package because of same package package extensions are preferred (KT-30633).
This commit is contained in:
@@ -14,6 +14,8 @@ package kotlin.collections
|
||||
//
|
||||
|
||||
import kotlin.random.*
|
||||
import kotlin.ranges.contains
|
||||
import kotlin.ranges.reversed
|
||||
|
||||
/**
|
||||
* Returns 1st *element* from the collection.
|
||||
|
||||
@@ -14,6 +14,8 @@ package kotlin.collections
|
||||
//
|
||||
|
||||
import kotlin.random.*
|
||||
import kotlin.ranges.contains
|
||||
import kotlin.ranges.reversed
|
||||
|
||||
/**
|
||||
* Returns 1st *element* from the collection.
|
||||
|
||||
@@ -14,6 +14,8 @@ package kotlin.collections
|
||||
//
|
||||
|
||||
import kotlin.random.*
|
||||
import kotlin.ranges.contains
|
||||
import kotlin.ranges.reversed
|
||||
|
||||
/**
|
||||
* Returns a [List] containing all key-value pairs.
|
||||
|
||||
@@ -14,6 +14,8 @@ package kotlin.collections
|
||||
//
|
||||
|
||||
import kotlin.random.*
|
||||
import kotlin.ranges.contains
|
||||
import kotlin.ranges.reversed
|
||||
|
||||
/**
|
||||
* Returns a set containing all elements of the original set except the given [element].
|
||||
|
||||
@@ -15,6 +15,8 @@ package kotlin.collections
|
||||
//
|
||||
|
||||
import kotlin.random.*
|
||||
import kotlin.ranges.contains
|
||||
import kotlin.ranges.reversed
|
||||
|
||||
/**
|
||||
* Returns 1st *element* from the collection.
|
||||
|
||||
@@ -14,6 +14,8 @@ package kotlin.collections
|
||||
//
|
||||
|
||||
import kotlin.random.*
|
||||
import kotlin.ranges.contains
|
||||
import kotlin.ranges.reversed
|
||||
|
||||
/**
|
||||
* Returns an array of UByte containing all of the elements of this collection.
|
||||
|
||||
Reference in New Issue
Block a user