KT-12628: new test for arg + something with nullable arg
(cherry picked from commit a7e4e2d)
This commit is contained in:
committed by
Mikhail Glukhikh
parent
9830140a15
commit
c439a751ab
@@ -0,0 +1,4 @@
|
|||||||
|
// "Replace with safe (?.) call" "true"
|
||||||
|
|
||||||
|
operator fun Int.plus(index: Int) = this
|
||||||
|
fun fox(arg: Int?) = arg <caret>+ 42
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
// "Replace with safe (?.) call" "true"
|
||||||
|
|
||||||
|
operator fun Int.plus(index: Int) = this
|
||||||
|
fun fox(arg: Int?) = arg?.plus(42)
|
||||||
@@ -6077,6 +6077,12 @@ public class QuickFixTestGenerated extends AbstractQuickFixTest {
|
|||||||
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInfixCall.kt");
|
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/quickfix/nullables/unsafeInfixCall/unsafeInfixCall.kt");
|
||||||
doTest(fileName);
|
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