Handle implicit receivers more accurately in if-then to safe access

#KT-26599 Fixed
This commit is contained in:
Mikhail Glukhikh
2018-09-07 14:52:46 +03:00
parent ccb17caf7b
commit 485e098ced
10 changed files with 114 additions and 7 deletions
@@ -286,6 +286,16 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/propertyWithProperty.kt");
}
@TestMetadata("replaceWithLetInMember.kt")
public void testReplaceWithLetInMember() throws Exception {
runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/replaceWithLetInMember.kt");
}
@TestMetadata("replaceWithLetInMemberWithIs.kt")
public void testReplaceWithLetInMemberWithIs() throws Exception {
runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/replaceWithLetInMemberWithIs.kt");
}
@TestMetadata("rhsEqualsNull.kt")
public void testRhsEqualsNull() throws Exception {
runTest("idea/testData/inspectionsLocal/branched/ifThenToSafeAccess/rhsEqualsNull.kt");
@@ -2426,6 +2426,16 @@ public class IntentionTestGenerated extends AbstractIntentionTest {
runTest("idea/testData/intentions/branched/ifThenToElvis/otherBlockHasMoreThanOneStatement.kt");
}
@TestMetadata("replaceWithLetInMember.kt")
public void testReplaceWithLetInMember() throws Exception {
runTest("idea/testData/intentions/branched/ifThenToElvis/replaceWithLetInMember.kt");
}
@TestMetadata("replaceWithLetInMemberWithIs.kt")
public void testReplaceWithLetInMemberWithIs() throws Exception {
runTest("idea/testData/intentions/branched/ifThenToElvis/replaceWithLetInMemberWithIs.kt");
}
@TestMetadata("rhsEqualsNull.kt")
public void testRhsEqualsNull() throws Exception {
runTest("idea/testData/intentions/branched/ifThenToElvis/rhsEqualsNull.kt");