mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] k2 inline: restore type parameter references
^KTIJ-29128 fixed GitOrigin-RevId: fc11b378f45f5590f7fff83e9f3072a2aae26c97
This commit is contained in:
committed by
intellij-monorepo-bot
parent
d1184b7970
commit
1d1bb026ea
+1
-3
@@ -12,6 +12,4 @@ object Test {
|
||||
private fun gazonk() {
|
||||
val ss = bar(Test.foo<String>())
|
||||
}
|
||||
}
|
||||
|
||||
// IGNORE_K2
|
||||
}
|
||||
+1
-3
@@ -7,6 +7,4 @@ object Test {
|
||||
private fun gazonk() {
|
||||
val ss = bar(emptyList<String>())
|
||||
}
|
||||
}
|
||||
|
||||
// IGNORE_K2
|
||||
}
|
||||
+3
@@ -43,6 +43,7 @@ import org.jetbrains.kotlin.psi.KtPsiFactory
|
||||
import org.jetbrains.kotlin.psi.KtQualifiedExpression
|
||||
import org.jetbrains.kotlin.psi.KtReferenceExpression
|
||||
import org.jetbrains.kotlin.psi.KtSimpleNameExpression
|
||||
import org.jetbrains.kotlin.psi.KtTypeParameter
|
||||
import org.jetbrains.kotlin.psi.KtUserType
|
||||
import org.jetbrains.kotlin.psi.KtValueArgumentName
|
||||
import org.jetbrains.kotlin.psi.createExpressionByPattern
|
||||
@@ -212,6 +213,8 @@ internal fun encodeInternalReferences(codeToInline: MutableCodeToInline, origina
|
||||
target.nameAsSafeName
|
||||
}
|
||||
expression.putCopyableUserData(CodeToInline.PARAMETER_USAGE_KEY, getParameterName())
|
||||
} else if (target is KtTypeParameter) {
|
||||
expression.putCopyableUserData(CodeToInline.TYPE_PARAMETER_USAGE_KEY, target.nameAsName)
|
||||
} else if (resolve == (originalDeclaration as? KtNamedFunction)?.receiverTypeReference && isAnonymousFunctionWithReceiver && expression.getReceiverExpression() == null) {
|
||||
expression.putCopyableUserData(CodeToInline.PARAMETER_USAGE_KEY, Name.identifier("p1"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user