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:
@@ -13,6 +13,8 @@ package kotlin.collections
|
||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||
//
|
||||
|
||||
import kotlin.ranges.contains
|
||||
import kotlin.ranges.reversed
|
||||
|
||||
/**
|
||||
* Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array.
|
||||
|
||||
@@ -13,6 +13,8 @@ package kotlin.collections
|
||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||
//
|
||||
|
||||
import kotlin.ranges.contains
|
||||
import kotlin.ranges.reversed
|
||||
|
||||
/**
|
||||
* Returns a list containing all elements that are instances of specified class.
|
||||
|
||||
@@ -14,6 +14,8 @@ package kotlin.collections
|
||||
// See: https://github.com/JetBrains/kotlin/tree/master/libraries/stdlib
|
||||
//
|
||||
|
||||
import kotlin.ranges.contains
|
||||
import kotlin.ranges.reversed
|
||||
|
||||
/**
|
||||
* Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array.
|
||||
|
||||
Reference in New Issue
Block a user