mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-04-04 15:51:54 +00:00
KT-12628: new test for arg + something with nullable arg
This commit is contained in:
4
idea/testData/quickfix/nullables/unsafeInfixCall/unsafePlus.kt
vendored
Normal file
4
idea/testData/quickfix/nullables/unsafeInfixCall/unsafePlus.kt
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
// "Replace with safe (?.) call" "true"
|
||||
|
||||
operator fun Int.plus(index: Int) = this
|
||||
fun fox(arg: Int?) = arg <caret>+ 42
|
||||
4
idea/testData/quickfix/nullables/unsafeInfixCall/unsafePlus.kt.after
vendored
Normal file
4
idea/testData/quickfix/nullables/unsafeInfixCall/unsafePlus.kt.after
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
// "Replace with safe (?.) call" "true"
|
||||
|
||||
operator fun Int.plus(index: Int) = this
|
||||
fun fox(arg: Int?) = arg?.plus(42)
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user