JVM_IR no nullability annotations on SAM wrapper constructor parameters
This commit is contained in:
+2
-1
@@ -286,7 +286,8 @@ abstract class AnnotationCodegen(
|
||||
when {
|
||||
declaration.origin.isSynthetic ->
|
||||
true
|
||||
declaration.origin == JvmLoweredDeclarationOrigin.INLINE_CLASS_GENERATED_IMPL_METHOD ->
|
||||
declaration.origin == JvmLoweredDeclarationOrigin.INLINE_CLASS_GENERATED_IMPL_METHOD ||
|
||||
declaration.origin == IrDeclarationOrigin.GENERATED_SAM_IMPLEMENTATION ->
|
||||
true
|
||||
else ->
|
||||
false
|
||||
|
||||
@@ -8,7 +8,7 @@ public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||
final class<null> TKt$sam$Sam$0 {
|
||||
// source: 't.kt'
|
||||
public final @org.jetbrains.annotations.NotNull <()Lkotlin/Function<*>;> method getFunctionDelegate(): kotlin.Function
|
||||
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||
public final <null> method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public synthetic final <null> method get(): java.lang.Object
|
||||
public final <null> method hashCode(): int
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
@kotlin.Metadata
|
||||
final class<null> TKt$sam$Sam$0 {
|
||||
// source: 't.kt'
|
||||
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||
public synthetic final <null> method get(): java.lang.Object
|
||||
enclosing class TKt
|
||||
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||
inner (anonymous) class TKt$sam$Sam$0
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class<null> TKt {
|
||||
// source: 't.kt'
|
||||
public final static <<T:Ljava/lang/Object;>(Lkotlin/jvm/functions/Function0<+TT;>;)TT;> method genericSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.Object
|
||||
inner (anonymous) class TKt$sam$Sam$0
|
||||
}
|
||||
@@ -1,24 +1,17 @@
|
||||
// FILE: test.kt
|
||||
fun test1() {
|
||||
val f = { }
|
||||
val t1 = Runnable(f)
|
||||
val t2 = Runnable(f)
|
||||
// WITH_RUNTIME
|
||||
|
||||
class A {
|
||||
fun test1() {
|
||||
val f = { }
|
||||
val t1 = Runnable(f)
|
||||
val t2 = Runnable(f)
|
||||
}
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
val t1 = getWrapped1()
|
||||
val t2 = getWrapped2()
|
||||
class B {
|
||||
fun test2() {
|
||||
val f = { }
|
||||
val t1 = Runnable(f)
|
||||
val t2 = Runnable(f)
|
||||
}
|
||||
}
|
||||
|
||||
// FILE: f1.kt
|
||||
fun getWrapped1(): Runnable {
|
||||
val f = { }
|
||||
return Runnable(f)
|
||||
}
|
||||
|
||||
// FILE: f2.kt
|
||||
fun getWrapped2(): Runnable {
|
||||
val f = { }
|
||||
return Runnable(f)
|
||||
}
|
||||
|
||||
|
||||
+31
-71
@@ -1,9 +1,19 @@
|
||||
@kotlin.Metadata
|
||||
final class F1Kt$getWrapped1$f$1 {
|
||||
// source: 'f1.kt'
|
||||
enclosing method F1Kt.getWrapped1()Ljava/lang/Runnable;
|
||||
public final static field INSTANCE: F1Kt$getWrapped1$f$1
|
||||
inner (anonymous) class F1Kt$getWrapped1$f$1
|
||||
final class A$sam$java_lang_Runnable$0 {
|
||||
// source: 'reusedSamWrapperClasses.kt'
|
||||
enclosing class A
|
||||
private synthetic final field function: kotlin.jvm.functions.Function0
|
||||
inner (anonymous) class A$sam$java_lang_Runnable$0
|
||||
method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||
public synthetic final method run(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class A$test1$f$1 {
|
||||
// source: 'reusedSamWrapperClasses.kt'
|
||||
enclosing method A.test1()V
|
||||
public final static field INSTANCE: A$test1$f$1
|
||||
inner (anonymous) class A$test1$f$1
|
||||
static method <clinit>(): void
|
||||
method <init>(): void
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
@@ -11,29 +21,20 @@ final class F1Kt$getWrapped1$f$1 {
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class F1Kt$sam$java_lang_Runnable$0 {
|
||||
// source: 'f1.kt'
|
||||
enclosing class F1Kt
|
||||
private synthetic final field function: kotlin.jvm.functions.Function0
|
||||
inner (anonymous) class F1Kt$sam$java_lang_Runnable$0
|
||||
method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||
public synthetic final method run(): void
|
||||
public final class A {
|
||||
// source: 'reusedSamWrapperClasses.kt'
|
||||
inner (anonymous) class A$sam$java_lang_Runnable$0
|
||||
inner (anonymous) class A$test1$f$1
|
||||
public method <init>(): void
|
||||
public final method test1(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class F1Kt {
|
||||
// source: 'f1.kt'
|
||||
inner (anonymous) class F1Kt$getWrapped1$f$1
|
||||
inner (anonymous) class F1Kt$sam$java_lang_Runnable$0
|
||||
public final static @org.jetbrains.annotations.NotNull method getWrapped1(): java.lang.Runnable
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class F2Kt$getWrapped2$f$1 {
|
||||
// source: 'f2.kt'
|
||||
enclosing method F2Kt.getWrapped2()Ljava/lang/Runnable;
|
||||
public final static field INSTANCE: F2Kt$getWrapped2$f$1
|
||||
inner (anonymous) class F2Kt$getWrapped2$f$1
|
||||
final class B$test2$f$1 {
|
||||
// source: 'reusedSamWrapperClasses.kt'
|
||||
enclosing method B.test2()V
|
||||
public final static field INSTANCE: B$test2$f$1
|
||||
inner (anonymous) class B$test2$f$1
|
||||
static method <clinit>(): void
|
||||
method <init>(): void
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
@@ -41,50 +42,9 @@ final class F2Kt$getWrapped2$f$1 {
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class F2Kt$sam$java_lang_Runnable$0 {
|
||||
// source: 'f2.kt'
|
||||
enclosing class F2Kt
|
||||
private synthetic final field function: kotlin.jvm.functions.Function0
|
||||
inner (anonymous) class F2Kt$sam$java_lang_Runnable$0
|
||||
method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||
public synthetic final method run(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class F2Kt {
|
||||
// source: 'f2.kt'
|
||||
inner (anonymous) class F2Kt$getWrapped2$f$1
|
||||
inner (anonymous) class F2Kt$sam$java_lang_Runnable$0
|
||||
public final static @org.jetbrains.annotations.NotNull method getWrapped2(): java.lang.Runnable
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class TestKt$sam$java_lang_Runnable$0 {
|
||||
// source: 'test.kt'
|
||||
enclosing class TestKt
|
||||
private synthetic final field function: kotlin.jvm.functions.Function0
|
||||
inner (anonymous) class TestKt$sam$java_lang_Runnable$0
|
||||
method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||
public synthetic final method run(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class TestKt$test1$f$1 {
|
||||
// source: 'test.kt'
|
||||
enclosing method TestKt.test1()V
|
||||
public final static field INSTANCE: TestKt$test1$f$1
|
||||
inner (anonymous) class TestKt$test1$f$1
|
||||
static method <clinit>(): void
|
||||
method <init>(): void
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
public final method invoke(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class TestKt {
|
||||
// source: 'test.kt'
|
||||
inner (anonymous) class TestKt$sam$java_lang_Runnable$0
|
||||
inner (anonymous) class TestKt$test1$f$1
|
||||
public final static method test1(): void
|
||||
public final static method test2(): void
|
||||
public final class B {
|
||||
// source: 'reusedSamWrapperClasses.kt'
|
||||
inner (anonymous) class B$test2$f$1
|
||||
public method <init>(): void
|
||||
public final method test2(): void
|
||||
}
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
@kotlin.Metadata
|
||||
final class F1Kt$getWrapped1$f$1 {
|
||||
// source: 'f1.kt'
|
||||
enclosing method F1Kt.getWrapped1()Ljava/lang/Runnable;
|
||||
public final static field INSTANCE: F1Kt$getWrapped1$f$1
|
||||
inner (anonymous) class F1Kt$getWrapped1$f$1
|
||||
static method <clinit>(): void
|
||||
method <init>(): void
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
public final method invoke(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class F1Kt$sam$java_lang_Runnable$0 {
|
||||
// source: 'f1.kt'
|
||||
enclosing class F1Kt
|
||||
private synthetic final field function: kotlin.jvm.functions.Function0
|
||||
inner (anonymous) class F1Kt$sam$java_lang_Runnable$0
|
||||
method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||
public synthetic final method run(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class F1Kt {
|
||||
// source: 'f1.kt'
|
||||
inner (anonymous) class F1Kt$getWrapped1$f$1
|
||||
inner (anonymous) class F1Kt$sam$java_lang_Runnable$0
|
||||
public final static @org.jetbrains.annotations.NotNull method getWrapped1(): java.lang.Runnable
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class F2Kt$getWrapped2$f$1 {
|
||||
// source: 'f2.kt'
|
||||
enclosing method F2Kt.getWrapped2()Ljava/lang/Runnable;
|
||||
public final static field INSTANCE: F2Kt$getWrapped2$f$1
|
||||
inner (anonymous) class F2Kt$getWrapped2$f$1
|
||||
static method <clinit>(): void
|
||||
method <init>(): void
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
public final method invoke(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class F2Kt$sam$java_lang_Runnable$0 {
|
||||
// source: 'f2.kt'
|
||||
enclosing class F2Kt
|
||||
private synthetic final field function: kotlin.jvm.functions.Function0
|
||||
inner (anonymous) class F2Kt$sam$java_lang_Runnable$0
|
||||
method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||
public synthetic final method run(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class F2Kt {
|
||||
// source: 'f2.kt'
|
||||
inner (anonymous) class F2Kt$getWrapped2$f$1
|
||||
inner (anonymous) class F2Kt$sam$java_lang_Runnable$0
|
||||
public final static @org.jetbrains.annotations.NotNull method getWrapped2(): java.lang.Runnable
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class TestKt$sam$java_lang_Runnable$0 {
|
||||
// source: 'test.kt'
|
||||
enclosing class TestKt
|
||||
private synthetic final field function: kotlin.jvm.functions.Function0
|
||||
inner (anonymous) class TestKt$sam$java_lang_Runnable$0
|
||||
method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||
public synthetic final method run(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
final class TestKt$test1$f$1 {
|
||||
// source: 'test.kt'
|
||||
enclosing method TestKt.test1()V
|
||||
public final static field INSTANCE: TestKt$test1$f$1
|
||||
inner (anonymous) class TestKt$test1$f$1
|
||||
static method <clinit>(): void
|
||||
method <init>(): void
|
||||
public synthetic bridge method invoke(): java.lang.Object
|
||||
public final method invoke(): void
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class TestKt {
|
||||
// source: 'test.kt'
|
||||
inner (anonymous) class TestKt$sam$java_lang_Runnable$0
|
||||
inner (anonymous) class TestKt$test1$f$1
|
||||
public final static method test1(): void
|
||||
public final static method test2(): void
|
||||
}
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
@kotlin.Metadata
|
||||
public final class<null> test/SamAdapterAndInlinedOneKt$sam$i$java_lang_Runnable$0 {
|
||||
// source: 'samAdapterAndInlinedOne.kt'
|
||||
public <null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||
public <null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||
public synthetic final <null> method run(): void
|
||||
enclosing class test/SamAdapterAndInlinedOneKt
|
||||
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||
@@ -11,7 +11,7 @@ public final class<null> test/SamAdapterAndInlinedOneKt$sam$i$java_lang_Runnabl
|
||||
@kotlin.Metadata
|
||||
final class<null> test/SamAdapterAndInlinedOneKt$sam$java_lang_Runnable$0 {
|
||||
// source: 'samAdapterAndInlinedOne.kt'
|
||||
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||
public synthetic final <null> method run(): void
|
||||
enclosing class test/SamAdapterAndInlinedOneKt
|
||||
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@ public interface<<T:Ljava/lang/Object;>Ljava/lang/Object;> Sam {
|
||||
final class<null> TKt$sam$Sam$0 {
|
||||
// source: 't.kt'
|
||||
public final @org.jetbrains.annotations.NotNull <()Lkotlin/Function<*>;> method getFunctionDelegate(): kotlin.Function
|
||||
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||
<null> method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||
public final <null> method equals(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
|
||||
public synthetic final <null> method get(): java.lang.Object
|
||||
public final <null> method hashCode(): int
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
@kotlin.Metadata
|
||||
final class<null> TKt$sam$Sam$0 {
|
||||
// source: 't.kt'
|
||||
<null> method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||
public synthetic final <null> method get(): java.lang.Object
|
||||
enclosing class TKt
|
||||
private synthetic final field <null> function: kotlin.jvm.functions.Function0
|
||||
inner (anonymous) class TKt$sam$Sam$0
|
||||
}
|
||||
|
||||
@kotlin.Metadata
|
||||
public final class<null> TKt {
|
||||
// source: 't.kt'
|
||||
public final static <(Lkotlin/jvm/functions/Function0<Ljava/lang/String;>;)Ljava/lang/String;> method specializedSam(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): java.lang.String
|
||||
inner (anonymous) class TKt$sam$Sam$0
|
||||
}
|
||||
+1
-1
@@ -64,7 +64,7 @@ public final class B$sam$i$java_lang_Runnable$0 {
|
||||
enclosing class B
|
||||
private synthetic final field function: kotlin.jvm.functions.Function0
|
||||
inner (anonymous) class B$sam$i$java_lang_Runnable$0
|
||||
public method <init>(@org.jetbrains.annotations.NotNull p0: kotlin.jvm.functions.Function0): void
|
||||
public method <init>(p0: kotlin.jvm.functions.Function0): void
|
||||
public synthetic final method run(): void
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user