KT-12628: new test for arg + something with nullable arg

This commit is contained in:
Mikhail Glukhikh
2016-07-27 17:15:35 +03:00
parent 24b5be3ebe
commit a7e4e2d5b0
3 changed files with 14 additions and 0 deletions

View File

@@ -0,0 +1,4 @@
// "Replace with safe (?.) call" "true"
operator fun Int.plus(index: Int) = this
fun fox(arg: Int?) = arg <caret>+ 42

View File

@@ -0,0 +1,4 @@
// "Replace with safe (?.) call" "true"
operator fun Int.plus(index: Int) = this
fun fox(arg: Int?) = arg?.plus(42)

View File

@@ -6116,6 +6116,12 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInfixCall.kt");
doTest(fileName);
}
@TestMetadata("unsafePlus.kt")
public void testUnsafePlus() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafePlus.kt");
doTest(fileName);
}
}
}