Minor. Move local functions as a private to class

This commit is contained in:
Denis Zharkov
2017-09-28 16:19:17 +03:00
parent 79a7c01eac
commit e519095e9e
@@ -229,15 +229,15 @@ object NewKotlinTypeChecker : KotlinTypeChecker {
} }
} }
private fun TypeCheckerContext.collectAndFilter(classType: SimpleType, constructor: TypeConstructor) =
selectOnlyPureKotlinSupertypes(collectAllSupertypesWithGivenTypeConstructor(classType, constructor))
// nullability was checked earlier via nullabilityChecker // nullability was checked earlier via nullabilityChecker
// should be used only if you really sure that it is correct // should be used only if you really sure that it is correct
fun TypeCheckerContext.findCorrespondingSupertypes( fun TypeCheckerContext.findCorrespondingSupertypes(
baseType: SimpleType, baseType: SimpleType,
constructor: TypeConstructor constructor: TypeConstructor
): List<SimpleType> { ): List<SimpleType> {
fun TypeCheckerContext.collectAndFilter(classType: SimpleType, constructor: TypeConstructor) =
selectOnlyPureKotlinSupertypes(collectAllSupertypesWithGivenTypeConstructor(classType, constructor))
if (baseType.isClassType) { if (baseType.isClassType) {
return collectAndFilter(baseType, constructor) return collectAndFilter(baseType, constructor)
} }