Parcelable: Fix 'Simple' test (new boolean serializer)

This commit is contained in:
Yan Zhulanow
2018-01-11 11:48:43 +09:00
parent 145ddf3b1f
commit bf9eed931b
2 changed files with 3 additions and 3 deletions
@@ -113,14 +113,14 @@ open class ParcelableResolveExtension : SyntheticResolveExtension {
&& modality != Modality.ABSTRACT
&& typeParameters.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 {
return typeParameters.isEmpty()
&& 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)
&& returnType?.let { KotlinBuiltIns.isUnit(it) } == true
}