[FIR-TEST] Add test with nullability annotation problem
#KT-36770
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// Original problem was discovered in `backend.main/org/jetbrains/kotlin/codegen/inline/InlineCache.kt`
|
||||
|
||||
// FILE: SLRUMap.java
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface SLRUMap<V> {
|
||||
void takeV(@NotNull V value);
|
||||
}
|
||||
|
||||
// FILE: main.kt
|
||||
|
||||
fun <V> SLRUMap<V>.getOrPut(value: V) {
|
||||
<!INAPPLICABLE_CANDIDATE!>takeV<!>(value)
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
FILE: main.kt
|
||||
public final fun <V> R|SLRUMap<V>|.getOrPut(value: R|V|): R|kotlin/Unit| {
|
||||
<Inapplicable(INAPPLICABLE): [/SLRUMap.takeV]>#(R|<local>/value|)
|
||||
}
|
||||
+5
@@ -1289,6 +1289,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/definetelyNotNullForTypeParameter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("definitelyNotNullAndOriginalType.kt")
|
||||
public void testDefinitelyNotNullAndOriginalType() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/definitelyNotNullAndOriginalType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("javaAccessorConversion.kt")
|
||||
public void testJavaAccessorConversion() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/javaAccessorConversion.kt");
|
||||
|
||||
Generated
+5
@@ -1289,6 +1289,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/definetelyNotNullForTypeParameter.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("definitelyNotNullAndOriginalType.kt")
|
||||
public void testDefinitelyNotNullAndOriginalType() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/definitelyNotNullAndOriginalType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("javaAccessorConversion.kt")
|
||||
public void testJavaAccessorConversion() throws Exception {
|
||||
runTest("compiler/fir/resolve/testData/resolve/problems/javaAccessorConversion.kt");
|
||||
|
||||
Reference in New Issue
Block a user