Light Classes: Skip irrelevant overloads when looking for light parameter

#KT-11868 Fixed
This commit is contained in:
Alexey Sedunov
2016-04-13 12:20:20 +03:00
parent c6b6e9f18b
commit 9bf395a4cd
4 changed files with 17 additions and 1 deletions
@@ -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> {