mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] k2 change signature: replace expressions of the same type to avoid broken psi
^KTIJ-33366 fixed GitOrigin-RevId: a897e309e9394c3e52938d3b2f6956bf67020968
This commit is contained in:
committed by
intellij-monorepo-bot
parent
af84acc92f
commit
652a953e11
+5
@@ -12481,6 +12481,11 @@ public abstract class K2IntentionTestGenerated extends AbstractK2IntentionTest {
|
||||
runTest("../../../idea/tests/testData/intentions/convertParameterToReceiver/recursiveCall1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simplifiedQualifier.kt")
|
||||
public void testSimplifiedQualifier() throws Exception {
|
||||
runTest("../../../idea/tests/testData/intentions/convertParameterToReceiver/simplifiedQualifier.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFun.kt")
|
||||
public void testTopLevelFun() throws Exception {
|
||||
runTest("../../../idea/tests/testData/intentions/convertParameterToReceiver/topLevelFun.kt");
|
||||
|
||||
+5
@@ -7305,6 +7305,11 @@ public abstract class K1IntentionTestGenerated extends AbstractK1IntentionTest {
|
||||
runTest("testData/intentions/convertParameterToReceiver/recursiveCall1.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simplifiedQualifier.kt")
|
||||
public void testSimplifiedQualifier() throws Exception {
|
||||
runTest("testData/intentions/convertParameterToReceiver/simplifiedQualifier.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("topLevelFun.kt")
|
||||
public void testTopLevelFun() throws Exception {
|
||||
runTest("testData/intentions/convertParameterToReceiver/topLevelFun.kt");
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_STDLIB
|
||||
class A {
|
||||
fun foo3() = 42
|
||||
|
||||
fun test(<caret>a: String) {
|
||||
foo3()
|
||||
}
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
// WITH_STDLIB
|
||||
class A {
|
||||
fun foo3() = 42
|
||||
|
||||
fun String.test(<caret>) {
|
||||
foo3()
|
||||
}
|
||||
}
|
||||
+4
@@ -78,6 +78,10 @@ internal class KotlinImplicitThisUsage(
|
||||
element: KtElement,
|
||||
allUsages: Array<out UsageInfo>
|
||||
): KtElement {
|
||||
val parent = element.parent
|
||||
if (parent is KtCallExpression) {
|
||||
return processUsage(changeInfo, parent, allUsages)
|
||||
}
|
||||
val newQualifiedCall = KtPsiFactory(element.project).createExpression("$newReceiver.${element.text}"
|
||||
) as KtQualifiedExpression
|
||||
return element.replace(newQualifiedCall).parent as KtElement
|
||||
|
||||
Reference in New Issue
Block a user