Add correct UL-method hasTypeParameters realization (#KT-30970 Fixed)

Incorrect realization is breaking-down of IDEA generic-type inference algorithm that leads to SOE.
This commit is contained in:
Igor Yakovlev
2019-05-31 19:55:19 +03:00
parent f660faed97
commit f5190f195d
@@ -137,6 +137,8 @@ open class KtLightMethodImpl protected constructor(
override fun getTypeParameters(): Array<PsiTypeParameter> =
typeParameterList?.typeParameters ?: PsiTypeParameter.EMPTY_ARRAY
override fun hasTypeParameters() = typeParameters.isNotEmpty()
override fun getSignature(substitutor: PsiSubstitutor): MethodSignature {
if (substitutor == PsiSubstitutor.EMPTY) {
return clsDelegate.getSignature(substitutor)
@@ -218,8 +220,6 @@ open class KtLightMethodImpl protected constructor(
override fun getThrowsList() = clsDelegate.throwsList
override fun hasTypeParameters() = clsDelegate.hasTypeParameters()
override fun isVarArgs() = (dummyDelegate ?: clsDelegate).isVarArgs
override fun isConstructor() = dummyDelegate?.isConstructor ?: clsDelegate.isConstructor