[AA] KT-55098 Add context receivers to KtFunctionalType
- Context receivers in function types may not be labeled, so the created `KtContextReceiver`s have `null` labels. Such labels currently only compile due to a bug (see KT-55187).
This commit is contained in:
committed by
Space Team
parent
2851622a6f
commit
e2804693bf
+1
-1
@@ -37,7 +37,7 @@ public abstract class KtContextReceiver : KtLifetimeOwner {
|
||||
}
|
||||
|
||||
/**
|
||||
* Something which can have a [KtContextReceiver] declared. This may be a callable symbol or a class symbol
|
||||
* Something which can have a [KtContextReceiver] declared. This may be a callable symbol, a class symbol, or a functional type.
|
||||
*/
|
||||
public interface KtContextReceiversOwner : KtLifetimeOwner {
|
||||
/**
|
||||
|
||||
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.analysis.api.types
|
||||
|
||||
import org.jetbrains.kotlin.analysis.api.KtTypeProjection
|
||||
import org.jetbrains.kotlin.analysis.api.annotations.KtAnnotated
|
||||
import org.jetbrains.kotlin.analysis.api.base.KtContextReceiversOwner
|
||||
import org.jetbrains.kotlin.analysis.api.lifetime.KtLifetimeOwner
|
||||
import org.jetbrains.kotlin.analysis.api.lifetime.withValidityAssertion
|
||||
import org.jetbrains.kotlin.analysis.api.symbols.KtClassLikeSymbol
|
||||
@@ -52,9 +53,10 @@ public sealed class KtNonErrorClassType : KtClassType() {
|
||||
abstract override val qualifiers: List<KtClassTypeQualifier.KtResolvedClassTypeQualifier>
|
||||
}
|
||||
|
||||
public abstract class KtFunctionalType : KtNonErrorClassType() {
|
||||
public abstract class KtFunctionalType : KtNonErrorClassType(), KtContextReceiversOwner {
|
||||
public abstract val isSuspend: Boolean
|
||||
public abstract val arity: Int
|
||||
public abstract val hasContextReceivers: Boolean
|
||||
public abstract val receiverType: KtType?
|
||||
public abstract val hasReceiver: Boolean
|
||||
public abstract val parameterTypes: List<KtType>
|
||||
|
||||
Reference in New Issue
Block a user