Minor. Rename FunctionClassDescriptor#functionKind -> functionTypeKind
This commit is needed for the following commit. There we will restore the compatibility API with Android IDEA plugin
This commit is contained in:
committed by
Space Team
parent
a14f3c8cc2
commit
bec9ad0f6b
+3
-3
@@ -31,9 +31,9 @@ import org.jetbrains.kotlin.utils.addToStdlib.shouldNotBeCalled
|
||||
class FunctionClassDescriptor(
|
||||
private val storageManager: StorageManager,
|
||||
private val containingDeclaration: PackageFragmentDescriptor,
|
||||
val functionKind: FunctionTypeKind,
|
||||
val functionTypeKind: FunctionTypeKind,
|
||||
val arity: Int
|
||||
) : AbstractClassDescriptor(storageManager, functionKind.numberedClassName(arity)) {
|
||||
) : AbstractClassDescriptor(storageManager, functionTypeKind.numberedClassName(arity)) {
|
||||
|
||||
private val typeConstructor = FunctionTypeConstructor()
|
||||
private val memberScope = FunctionClassScope(storageManager, this)
|
||||
@@ -95,7 +95,7 @@ class FunctionClassDescriptor(
|
||||
private inner class FunctionTypeConstructor : AbstractClassTypeConstructor(storageManager) {
|
||||
override fun computeSupertypes(): Collection<KotlinType> {
|
||||
// For K{Suspend}Function{n}, add corresponding numbered {Suspend}Function{n} class, e.g. {Suspend}Function2 for K{Suspend}Function2
|
||||
val supertypes = when (functionKind) {
|
||||
val supertypes = when (functionTypeKind) {
|
||||
FunctionTypeKind.Function -> // Function$N <: Function
|
||||
listOf(functionClassId)
|
||||
FunctionTypeKind.KFunction -> // KFunction$N <: KFunction
|
||||
|
||||
@@ -25,7 +25,7 @@ class FunctionClassScope(
|
||||
containingClass: FunctionClassDescriptor
|
||||
) : GivenFunctionsMemberScope(storageManager, containingClass) {
|
||||
override fun computeDeclaredFunctions(): List<FunctionDescriptor> =
|
||||
when ((containingClass as FunctionClassDescriptor).functionKind) {
|
||||
when ((containingClass as FunctionClassDescriptor).functionTypeKind) {
|
||||
FunctionTypeKind.Function -> listOf(FunctionInvokeDescriptor.create(containingClass, isSuspend = false))
|
||||
FunctionTypeKind.SuspendFunction -> listOf(FunctionInvokeDescriptor.create(containingClass, isSuspend = true))
|
||||
else -> emptyList()
|
||||
|
||||
Reference in New Issue
Block a user