Revert formatting change

This commit is contained in:
Tamas Vajk
2022-09-06 13:28:38 +02:00
parent bbf4563cfe
commit 57f50725ba

View File

@@ -1196,17 +1196,16 @@ open class KotlinUsesExtractor(
// Look for an exact type match...
javaClass.declarations.findSubType<IrFunction> { decl ->
decl.name.asString() == jvmName &&
decl.valueParameters.size == f.valueParameters.size &&
// Note matching by classifier not the whole type so that generic arguments are allowed to differ,
// as they always will for method type parameters occurring in parameter types (e.g. <T> toArray(T[] array)
// Differing only by nullability would also be insignificant if it came up.
decl.valueParameters.zip(f.valueParameters)
.all { p -> p.first.type.classifierOrNull == p.second.type.classifierOrNull }
decl.valueParameters.size == f.valueParameters.size &&
// Note matching by classifier not the whole type so that generic arguments are allowed to differ,
// as they always will for method type parameters occurring in parameter types (e.g. <T> toArray(T[] array)
// Differing only by nullability would also be insignificant if it came up.
decl.valueParameters.zip(f.valueParameters).all { p -> p.first.type.classifierOrNull == p.second.type.classifierOrNull }
} ?:
// Or if there is none, look for the only viable overload
javaClass.declarations.singleOrNullSubType<IrFunction> { decl ->
decl.name.asString() == jvmName &&
decl.valueParameters.size == f.valueParameters.size
decl.valueParameters.size == f.valueParameters.size
} ?:
// Or check property accessors:
(f.propertyIfAccessor as? IrProperty)?.let { kotlinProp ->