Introduce KotlinBuiltIns.isUnderKotlinPackage

Semantics is the same as in the former
FunctionDescriptor.hasSubpackageOfKotlin, but it doesn't compute the FQ
name of the descriptor
This commit is contained in:
Alexander Udalov
2017-06-20 19:48:46 +03:00
parent 7bc42f89d3
commit aed5b934f8
6 changed files with 27 additions and 20 deletions
@@ -210,8 +210,8 @@ class LazyJavaClassDescriptor(
}
private fun getPurelyImplementedSupertype(): KotlinType? {
val annotatedPurelyImplementedFqName = getPurelyImplementsFqNameFromAnnotation()?.takeIf {
!it.isRoot && it.toUnsafe().startsWith(KotlinBuiltIns.BUILT_INS_PACKAGE_NAME)
val annotatedPurelyImplementedFqName = getPurelyImplementsFqNameFromAnnotation()?.takeIf { fqName ->
!fqName.isRoot && fqName.startsWith(KotlinBuiltIns.BUILT_INS_PACKAGE_NAME)
}
val purelyImplementedFqName =