mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] KTIJ-34996 Fixed postfix not completion inserting redundant parentheses in dot qualified expressions
^KTIJ-34996 fixed GitOrigin-RevId: 15da0b3c1c50416f19f15c9d1c87ab7f9d3592cb
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e26c3ad1b3
commit
1cf124fa36
+1
@@ -147,6 +147,7 @@ internal object KotlinPostfixTemplatePsiInfo : PostfixTemplatePsiInfo() {
|
||||
is KtLambdaExpression,
|
||||
is KtCallExpression,
|
||||
is KtConstantExpression,
|
||||
is KtDotQualifiedExpression,
|
||||
is KtStringTemplateExpression -> false
|
||||
else -> true
|
||||
}
|
||||
|
||||
+15
@@ -510,6 +510,21 @@ public abstract class K2PostfixTemplateTestGenerated extends AbstractK2PostfixTe
|
||||
performTest();
|
||||
}
|
||||
|
||||
@TestMetadata("qualifiedCallInsideWithCall.kt")
|
||||
public void testQualifiedCallInsideWithCall() throws Exception {
|
||||
performTest();
|
||||
}
|
||||
|
||||
@TestMetadata("qualifiedCallInsideWithProperty.kt")
|
||||
public void testQualifiedCallInsideWithProperty() throws Exception {
|
||||
performTest();
|
||||
}
|
||||
|
||||
@TestMetadata("qualifiedCallWithLambda.kt")
|
||||
public void testQualifiedCallWithLambda() throws Exception {
|
||||
performTest();
|
||||
}
|
||||
|
||||
@TestMetadata("simple.kt")
|
||||
public void testSimple() throws Exception {
|
||||
performTest();
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
fun test() {
|
||||
!(Foo().condition())
|
||||
!Foo().condition()
|
||||
}
|
||||
|
||||
class Foo {
|
||||
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun test() {
|
||||
(!Foo().foo()).condition()
|
||||
}
|
||||
|
||||
fun Boolean.condition(): Boolean = true
|
||||
|
||||
class Foo {
|
||||
fun foo(): Boolean = true
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun test() {
|
||||
Foo().foo()<caret>.condition()
|
||||
}
|
||||
|
||||
fun Boolean.condition(): Boolean = true
|
||||
|
||||
class Foo {
|
||||
fun foo(): Boolean = true
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun test() {
|
||||
(!Foo().foo).condition()
|
||||
}
|
||||
|
||||
fun Boolean.condition(): Boolean = true
|
||||
|
||||
class Foo {
|
||||
val foo: Boolean = true
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
fun test() {
|
||||
Foo().foo<caret>.condition()
|
||||
}
|
||||
|
||||
fun Boolean.condition(): Boolean = true
|
||||
|
||||
class Foo {
|
||||
val foo: Boolean = true
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun test() {
|
||||
!Foo().condition { }
|
||||
}
|
||||
|
||||
class Foo {
|
||||
fun condition(f: () -> Unit): Boolean = true
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
fun test() {
|
||||
Foo().condition { }<caret>
|
||||
}
|
||||
|
||||
class Foo {
|
||||
fun condition(f: () -> Unit): Boolean = true
|
||||
}
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
fun test() {
|
||||
if (!(Foo().check(1, 2))) {
|
||||
|
||||
if (!Foo().check(1, 2)) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user