Fix nullability of typePath parameter
#KT-41484 Fixed
This commit is contained in:
@@ -37,7 +37,7 @@ open class MethodBodyVisitor(mv: MethodVisitor) : MethodVisitor(Opcodes.API_VERS
|
||||
|
||||
override fun visitAnnotation(desc: String, visible: Boolean): AnnotationVisitor? = null
|
||||
|
||||
override fun visitTypeAnnotation(typeRef: Int, typePath: TypePath, desc: String, visible: Boolean): AnnotationVisitor? = null
|
||||
override fun visitTypeAnnotation(typeRef: Int, typePath: TypePath?, desc: String, visible: Boolean): AnnotationVisitor? = null
|
||||
|
||||
override fun visitParameterAnnotation(parameter: Int, desc: String, visible: Boolean): AnnotationVisitor? = null
|
||||
|
||||
|
||||
Generated
+5
@@ -276,6 +276,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
|
||||
runTest("compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturn.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt41484.kt")
|
||||
public void testKt41484() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/typeAnnotations/kt41484.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("methodParameters.kt")
|
||||
public void testMethodParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/typeAnnotations/methodParameters.kt");
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
// KOTLIN_CONFIGURATION_FLAGS: +JVM.EMIT_JVM_TYPE_ANNOTATIONS
|
||||
// TARGET_BACKEND: JVM
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// JVM_TARGET: 1.8
|
||||
// FULL_JDK
|
||||
|
||||
// FILE: Single.java
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
public class Single<T> {
|
||||
|
||||
public T value;
|
||||
|
||||
public Single(T value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target({ ElementType.TYPE_USE, ElementType.TYPE })
|
||||
public @ interface NonNull {}
|
||||
|
||||
@NonNull
|
||||
public static <@NonNull T> Single<T> just(T item)
|
||||
{
|
||||
return new Single (item);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// FILE: Kotlin.kt
|
||||
|
||||
public inline fun <T> myfold(initial: T, operation: (T) -> T): T {
|
||||
return operation(initial)
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
return (myfold(Single.just("O")) { Single.just(it.value + "K") }).value
|
||||
}
|
||||
|
||||
+5
@@ -276,6 +276,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
||||
runTest("compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturn.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt41484.kt")
|
||||
public void testKt41484() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/typeAnnotations/kt41484.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("methodParameters.kt")
|
||||
public void testMethodParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/typeAnnotations/methodParameters.kt");
|
||||
|
||||
+5
@@ -276,6 +276,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
||||
runTest("compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturn.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt41484.kt")
|
||||
public void testKt41484() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/typeAnnotations/kt41484.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("methodParameters.kt")
|
||||
public void testMethodParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/typeAnnotations/methodParameters.kt");
|
||||
|
||||
+5
@@ -276,6 +276,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
||||
runTest("compiler/testData/codegen/box/annotations/typeAnnotations/implicitReturn.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("kt41484.kt")
|
||||
public void testKt41484() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/typeAnnotations/kt41484.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("methodParameters.kt")
|
||||
public void testMethodParameters() throws Exception {
|
||||
runTest("compiler/testData/codegen/box/annotations/typeAnnotations/methodParameters.kt");
|
||||
|
||||
Reference in New Issue
Block a user