IfThenToSafeAccessInspection: do not report if condition is SENSELESS_COMPARISON/USELESS_IS_CHECK (#3007)
#KT-36051 Fixed
This commit is contained in:
committed by
GitHub
parent
122bba9102
commit
d965ad0a98
+10
@@ -757,6 +757,11 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
|
||||
runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/rhsNotEqualsNull.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("senselessComparison.kt")
|
||||
public void testSenselessComparison() throws Exception {
|
||||
runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/senselessComparison.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("thenAndElseBothNull.kt")
|
||||
public void testThenAndElseBothNull() throws Exception {
|
||||
runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/thenAndElseBothNull.kt");
|
||||
@@ -787,6 +792,11 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
|
||||
runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/unacceptableNoThenBlock.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("uselessIsCheck.kt")
|
||||
public void testUselessIsCheck() throws Exception {
|
||||
runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/uselessIsCheck.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("willNotInlineClassProperty.kt")
|
||||
public void testWillNotInlineClassProperty() throws Exception {
|
||||
runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/willNotInlineClassProperty.kt");
|
||||
|
||||
Reference in New Issue
Block a user