[FE 1.0] Report errors on cycles in annotation parameter types
^KT-47932 ^KT-50753 Fixed
This commit is contained in:
committed by
teamcity
parent
139a800ff7
commit
e9ac24dc33
@@ -17,7 +17,9 @@ import org.jetbrains.kotlin.incremental.components.NoLookupLocation
|
||||
import org.jetbrains.kotlin.name.ClassId
|
||||
import org.jetbrains.kotlin.name.FqNameUnsafe
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
import org.jetbrains.kotlin.name.StandardClassIds
|
||||
import org.jetbrains.kotlin.resolve.DescriptorUtils
|
||||
import org.jetbrains.kotlin.resolve.descriptorUtil.classId
|
||||
import org.jetbrains.kotlin.resolve.scopes.MemberScope
|
||||
import org.jetbrains.kotlin.types.*
|
||||
import org.jetbrains.kotlin.util.capitalizeDecapitalize.capitalizeAsciiOnly
|
||||
@@ -99,6 +101,11 @@ class ReflectionTypes(module: ModuleDescriptor, private val notFoundClasses: Not
|
||||
return containingPackage != null && containingPackage.fqName == KOTLIN_REFLECT_FQ_NAME
|
||||
}
|
||||
|
||||
fun isKClassType(type: KotlinType): Boolean {
|
||||
val descriptor = type.unwrap().constructor.declarationDescriptor ?: return false
|
||||
return descriptor.classId == StandardClassIds.KClass
|
||||
}
|
||||
|
||||
fun isCallableType(type: KotlinType): Boolean =
|
||||
type.isFunctionTypeOrSubtype || type.isSuspendFunctionTypeOrSubtype || isKCallableType(type)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user