Light Classes: Skip irrelevant overloads when looking for light parameter
#KT-11868 Fixed
This commit is contained in:
@@ -173,6 +173,7 @@ Issues fixed:
|
||||
- [KT-11719](https://youtrack.jetbrains.com/issue/KT-11719) Fixed renaming of Kotlin parameters references in XML files
|
||||
- Fix several issues leading to exceptions: [KT-11579](https://youtrack.jetbrains.com/issue/KT-11579), [KT-11580](https://youtrack.jetbrains.com/issue/KT-11580), [KT-11777](https://youtrack.jetbrains.com/issue/KT-11777)
|
||||
- Fixed NoSuchFieldException in Kotlin module settings on IDEA Ultimate
|
||||
- [KT-11868](https://youtrack.jetbrains.com/issue/KT-11868) Fixed exception on search of functions/constructors with default parameters
|
||||
|
||||
#### Debugger
|
||||
|
||||
|
||||
@@ -89,7 +89,9 @@ fun KtParameter.toPsiParameters(): Collection<PsiParameter> {
|
||||
else -> null
|
||||
} ?: return emptyList()
|
||||
|
||||
return methods.map { it.parameterList.parameters[lightParamIndex] }
|
||||
return methods.mapNotNull {
|
||||
if (it.parameterList.parametersCount > lightParamIndex) it.parameterList.parameters[lightParamIndex] else null
|
||||
}
|
||||
}
|
||||
|
||||
fun KtTypeParameter.toPsiTypeParameters(): List<PsiTypeParameter> {
|
||||
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
class Collected(var property: String = "")
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
Collected().property = "0"
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import kotlin.jvm.JvmOverloads
|
||||
|
||||
@JvmOverloads
|
||||
fun foo(s: String = "")
|
||||
|
||||
fun main(args: Array<String>) {
|
||||
foo()
|
||||
}
|
||||
Reference in New Issue
Block a user