mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] IDEA-353900 k2: Don't produce <> if there is no params
GitOrigin-RevId: afec1ef8347f39ada748a3f652a362be576dc2c7
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a2ca3fd2e3
commit
77db7b1b79
+2
-2
@@ -249,11 +249,11 @@ abstract class KotlinUastElementFactory(project: Project) : UastElementFactory {
|
||||
|
||||
val methodCallPsiType = KotlinUFunctionCallExpression(analyzableMethodCall, null).getExpressionType()
|
||||
if (methodCallPsiType == null || !expectedReturnType.isAssignableFrom(GenericsUtil.eliminateWildcards(methodCallPsiType))) {
|
||||
val typeParams = (expectedReturnType as? PsiClassType)?.parameters?.map { it.getFQname(context) }
|
||||
val typeParams = (expectedReturnType as? PsiClassType)?.parameters?.mapNotNull { it.getFQname(context) }
|
||||
if (typeParams == null) return KotlinUFunctionCallExpression(analyzableMethodCall, null)
|
||||
|
||||
for (typeParam in typeParams) {
|
||||
val typeParameter = psiFactory.createTypeArgument(typeParam.orEmpty())
|
||||
val typeParameter = psiFactory.createTypeArgument(typeParam)
|
||||
analyzableMethodCall.addTypeArgument(typeParameter)
|
||||
}
|
||||
return KotlinUFunctionCallExpression(analyzableMethodCall, null)
|
||||
|
||||
Reference in New Issue
Block a user