[parcelize] Fix codegen for generic classes
Replace type arguments with star projection in static methods Fix IR function generation ^KT-42652 Fixed
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
public final class Box$Creator : java/lang/Object, android/os/Parcelable$Creator {
|
||||
public void <init>()
|
||||
|
||||
public final Box createFromParcel(android.os.Parcel parcel) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (parcel)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkNotNullParameter, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
NEW
|
||||
DUP
|
||||
ALOAD (1)
|
||||
LDC (LBox;)
|
||||
INVOKEVIRTUAL (java/lang/Class, getClassLoader, ()Ljava/lang/ClassLoader;)
|
||||
INVOKEVIRTUAL (android/os/Parcel, readParcelable, (Ljava/lang/ClassLoader;)Landroid/os/Parcelable;)
|
||||
INVOKESPECIAL (Box, <init>, (Landroid/os/Parcelable;)V)
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public java.lang.Object createFromParcel(android.os.Parcel source) {
|
||||
LABEL (L0)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
INVOKEVIRTUAL (Box$Creator, createFromParcel, (Landroid/os/Parcel;)LBox;)
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public final Box[] newArray(int size)
|
||||
|
||||
public java.lang.Object[] newArray(int size)
|
||||
}
|
||||
|
||||
public final class Box : java/lang/Object, android/os/Parcelable {
|
||||
public final static android.os.Parcelable$Creator CREATOR
|
||||
|
||||
private final android.os.Parcelable box
|
||||
|
||||
static void <clinit>()
|
||||
|
||||
public void <init>(android.os.Parcelable box)
|
||||
|
||||
public final android.os.Parcelable component1()
|
||||
|
||||
public final Box copy(android.os.Parcelable box)
|
||||
|
||||
public static Box copy$default(Box p0, android.os.Parcelable p1, int p2, java.lang.Object p3)
|
||||
|
||||
public int describeContents()
|
||||
|
||||
public boolean equals(java.lang.Object other)
|
||||
|
||||
public final android.os.Parcelable getBox()
|
||||
|
||||
public int hashCode()
|
||||
|
||||
public java.lang.String toString()
|
||||
|
||||
public void writeToParcel(android.os.Parcel out, int flags) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (out)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkNotNullParameter, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (1)
|
||||
ALOAD (0)
|
||||
GETFIELD (box, Landroid/os/Parcelable;)
|
||||
ILOAD (2)
|
||||
INVOKEVIRTUAL (android/os/Parcel, writeParcelable, (Landroid/os/Parcelable;I)V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// CURIOUS_ABOUT writeToParcel, createFromParcel
|
||||
// WITH_RUNTIME
|
||||
|
||||
import kotlinx.parcelize.*
|
||||
import android.os.Parcelable
|
||||
|
||||
@Parcelize
|
||||
data class Box<T : Parcelable>(val box: T) : Parcelable
|
||||
@@ -0,0 +1,72 @@
|
||||
public final class Box$Creator : java/lang/Object, android/os/Parcelable$Creator {
|
||||
public void <init>()
|
||||
|
||||
public final Box createFromParcel(android.os.Parcel in) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (in)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkNotNullParameter, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
NEW
|
||||
DUP
|
||||
ALOAD (1)
|
||||
LDC (LBox;)
|
||||
INVOKEVIRTUAL (java/lang/Class, getClassLoader, ()Ljava/lang/ClassLoader;)
|
||||
INVOKEVIRTUAL (android/os/Parcel, readParcelable, (Ljava/lang/ClassLoader;)Landroid/os/Parcelable;)
|
||||
INVOKESPECIAL (Box, <init>, (Landroid/os/Parcelable;)V)
|
||||
ARETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
|
||||
public java.lang.Object createFromParcel(android.os.Parcel p0) {
|
||||
LABEL (L0)
|
||||
LINENUMBER (8)
|
||||
ALOAD (0)
|
||||
ALOAD (1)
|
||||
INVOKEVIRTUAL (Box$Creator, createFromParcel, (Landroid/os/Parcel;)LBox;)
|
||||
ARETURN
|
||||
}
|
||||
|
||||
public final Box[] newArray(int size)
|
||||
|
||||
public java.lang.Object[] newArray(int p0)
|
||||
}
|
||||
|
||||
public final class Box : java/lang/Object, android/os/Parcelable {
|
||||
public final static android.os.Parcelable$Creator CREATOR
|
||||
|
||||
private final android.os.Parcelable box
|
||||
|
||||
static void <clinit>()
|
||||
|
||||
public void <init>(android.os.Parcelable box)
|
||||
|
||||
public final android.os.Parcelable component1()
|
||||
|
||||
public final Box copy(android.os.Parcelable box)
|
||||
|
||||
public static Box copy$default(Box p0, android.os.Parcelable p1, int p2, java.lang.Object p3)
|
||||
|
||||
public int describeContents()
|
||||
|
||||
public boolean equals(java.lang.Object p0)
|
||||
|
||||
public final android.os.Parcelable getBox()
|
||||
|
||||
public int hashCode()
|
||||
|
||||
public java.lang.String toString()
|
||||
|
||||
public void writeToParcel(android.os.Parcel parcel, int flags) {
|
||||
LABEL (L0)
|
||||
ALOAD (1)
|
||||
LDC (parcel)
|
||||
INVOKESTATIC (kotlin/jvm/internal/Intrinsics, checkNotNullParameter, (Ljava/lang/Object;Ljava/lang/String;)V)
|
||||
ALOAD (1)
|
||||
ALOAD (0)
|
||||
GETFIELD (box, Landroid/os/Parcelable;)
|
||||
ILOAD (2)
|
||||
INVOKEVIRTUAL (android/os/Parcel, writeParcelable, (Landroid/os/Parcelable;I)V)
|
||||
RETURN
|
||||
LABEL (L1)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user