NI: Fix exception during callable references overload resolution
^KT-35847 Fixed
This commit is contained in:
@@ -21,7 +21,6 @@ import org.jetbrains.kotlin.types.typeUtil.asTypeProjection
|
||||
import org.jetbrains.kotlin.types.typeUtil.replaceAnnotations
|
||||
import org.jetbrains.kotlin.utils.DFS
|
||||
import org.jetbrains.kotlin.utils.addIfNotNull
|
||||
import org.jetbrains.kotlin.utils.addToStdlib.safeAs
|
||||
import java.util.*
|
||||
|
||||
private fun KotlinType.isTypeOrSubtypeOf(predicate: (KotlinType) -> Boolean): Boolean =
|
||||
@@ -140,10 +139,10 @@ fun KotlinType.getValueParameterTypesFromFunctionType(): List<TypeProjection> {
|
||||
return arguments.subList(first, last)
|
||||
}
|
||||
|
||||
fun KotlinType.getValueParameterTypesFromCallableReflectionType(withReceiver: Boolean): List<TypeProjection> {
|
||||
fun KotlinType.getValueParameterTypesFromCallableReflectionType(isCallableTypeWithExtension: Boolean): List<TypeProjection> {
|
||||
assert(ReflectionTypes.isKCallableType(this)) { "Not a callable reflection type: $this" }
|
||||
val arguments = arguments
|
||||
val first = if (withReceiver) 0 else 1
|
||||
val first = if (isCallableTypeWithExtension) 1 else 0
|
||||
val last = arguments.size - 1
|
||||
assert(first <= last) { "Not an exact function type: $this" }
|
||||
return arguments.subList(first, last)
|
||||
|
||||
Reference in New Issue
Block a user