Parcelable: Fix 'Simple' test (new boolean serializer)
This commit is contained in:
+2
-2
@@ -113,14 +113,14 @@ open class ParcelableResolveExtension : SyntheticResolveExtension {
|
|||||||
&& modality != Modality.ABSTRACT
|
&& modality != Modality.ABSTRACT
|
||||||
&& typeParameters.isEmpty()
|
&& typeParameters.isEmpty()
|
||||||
&& valueParameters.isEmpty()
|
&& valueParameters.isEmpty()
|
||||||
&& returnType?.let { type -> KotlinBuiltIns.isInt(type) } == true
|
// Unfortunately, we can't check the return type as it's unresolved in IDE light classes
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun SimpleFunctionDescriptor.isWriteToParcel(): Boolean {
|
internal fun SimpleFunctionDescriptor.isWriteToParcel(): Boolean {
|
||||||
return typeParameters.isEmpty()
|
return typeParameters.isEmpty()
|
||||||
&& valueParameters.size == 2
|
&& valueParameters.size == 2
|
||||||
// Unfortunately, we can't check the first parameter cause it can be unresolved
|
// Unfortunately, we can't check the first parameter type as it's unresolved in IDE light classes
|
||||||
&& KotlinBuiltIns.isInt(valueParameters[1].type)
|
&& KotlinBuiltIns.isInt(valueParameters[1].type)
|
||||||
&& returnType?.let { KotlinBuiltIns.isUnit(it) } == true
|
&& returnType?.let { KotlinBuiltIns.isUnit(it) } == true
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -17,7 +17,7 @@ public final class User$Creator : java/lang/Object, android/os/Parcelable$Creato
|
|||||||
INVOKEVIRTUAL (android/os/Parcel, readInt, ()I)
|
INVOKEVIRTUAL (android/os/Parcel, readInt, ()I)
|
||||||
ALOAD (1)
|
ALOAD (1)
|
||||||
INVOKEVIRTUAL (android/os/Parcel, readInt, ()I)
|
INVOKEVIRTUAL (android/os/Parcel, readInt, ()I)
|
||||||
IFLE (L2)
|
IFEQ (L2)
|
||||||
ICONST_1
|
ICONST_1
|
||||||
GOTO (L3)
|
GOTO (L3)
|
||||||
LABEL (L2)
|
LABEL (L2)
|
||||||
|
|||||||
Reference in New Issue
Block a user