mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[kotlin] Simplify check for receiver being super in UsePropertyAccessSyntaxInspection, and remove useless test
Test dontReplaceWhenReceiverIsSuper already covers this case ^KTIJ-31647 Fixed (cherry picked from commit e732a8115a6bc376c9f4e3c82e78b1ea700fd0a8) IJ-CR-148581 GitOrigin-RevId: 10fc651b4d2a1e38b0df05fb2c2e4e69f10ccd17
This commit is contained in:
committed by
intellij-monorepo-bot
parent
4dc92cf3fa
commit
b71d2d88d2
+1
-3
@@ -165,10 +165,8 @@ class UsePropertyAccessSyntaxInspection : LocalInspectionTool(), CleanupLocalIns
|
||||
return
|
||||
}
|
||||
|
||||
if (expressionParent is KtDotQualifiedExpression) {
|
||||
if (expressionParent.receiverExpression is KtSuperExpression) {
|
||||
if (callExpression.getQualifiedExpressionForSelector()?.receiverExpression is KtSuperExpression) {
|
||||
return // Shouldn't suggest property accessors on "super"
|
||||
}
|
||||
}
|
||||
|
||||
if (propertyAccessorKind is PropertyAccessorKind.Setter) {
|
||||
|
||||
-5
@@ -6350,11 +6350,6 @@ public abstract class K2LocalInspectionTestGenerated extends AbstractK2LocalInsp
|
||||
runTest("../../../idea/tests/testData/inspectionsLocal/usePropertyAccessSyntax/dotQualifiedExpressions/dontReplaceFirstSetterInChain.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("dontReplaceGetterAfterSuperCall.kt")
|
||||
public void testDontReplaceGetterAfterSuperCall() throws Exception {
|
||||
runTest("../../../idea/tests/testData/inspectionsLocal/usePropertyAccessSyntax/dotQualifiedExpressions/dontReplaceGetterAfterSuperCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("dontReplaceGetterFromKotlinFile.kt")
|
||||
public void testDontReplaceGetterFromKotlinFile() throws Exception {
|
||||
runTest("../../../idea/tests/testData/inspectionsLocal/usePropertyAccessSyntax/dotQualifiedExpressions/dontReplaceGetterFromKotlinFile.kt");
|
||||
|
||||
-5
@@ -19272,11 +19272,6 @@ public abstract class LocalInspectionTestGenerated extends AbstractLocalInspecti
|
||||
runTest("testData/inspectionsLocal/usePropertyAccessSyntax/dotQualifiedExpressions/dontReplaceFirstSetterInChain.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("dontReplaceGetterAfterSuperCall.kt")
|
||||
public void testDontReplaceGetterAfterSuperCall() throws Exception {
|
||||
runTest("testData/inspectionsLocal/usePropertyAccessSyntax/dotQualifiedExpressions/dontReplaceGetterAfterSuperCall.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("dontReplaceGetterFromKotlinFile.kt")
|
||||
public void testDontReplaceGetterFromKotlinFile() throws Exception {
|
||||
runTest("testData/inspectionsLocal/usePropertyAccessSyntax/dotQualifiedExpressions/dontReplaceGetterFromKotlinFile.kt");
|
||||
|
||||
-9
@@ -1,9 +0,0 @@
|
||||
// WITH_STDLIB
|
||||
// PROBLEM: none
|
||||
import java.io.File
|
||||
|
||||
class MyFile : File("file") {
|
||||
override fun getCanonicalFile(): File {
|
||||
return super.<caret>getCanonicalFile()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user