FIR IDE: introduce KtCapturedType
This commit is contained in:
committed by
TeamCityServer
parent
e2cfd933f1
commit
8177a70ff9
@@ -55,6 +55,8 @@ abstract class KtTypeParameterType : KtTypeWithNullability {
|
||||
abstract val symbol: KtTypeParameterSymbol
|
||||
}
|
||||
|
||||
abstract class KtCapturedType : KtType
|
||||
|
||||
abstract class KtFlexibleType : KtType {
|
||||
abstract val lowerBound: KtType
|
||||
abstract val upperBound: KtType
|
||||
|
||||
+1
@@ -320,6 +320,7 @@ internal class KtSymbolByFirBuilder private constructor(
|
||||
is ConeFlexibleType -> KtFirFlexibleType(coneType, token, this@KtSymbolByFirBuilder)
|
||||
is ConeIntersectionType -> KtFirIntersectionType(coneType, token, this@KtSymbolByFirBuilder)
|
||||
is ConeDefinitelyNotNullType -> buildKtType(coneType.original)
|
||||
is ConeCapturedType -> KtFirCapturedType(coneType, token)
|
||||
else -> throwUnexpectedElementError(coneType)
|
||||
}
|
||||
}
|
||||
|
||||
+9
@@ -101,6 +101,15 @@ internal class KtFirClassErrorType(
|
||||
override fun asStringForDebugging(): String = withValidityAssertion { coneType.render() }
|
||||
}
|
||||
|
||||
internal class KtFirCapturedType(
|
||||
coneType: ConeCapturedType,
|
||||
override val token: ValidityToken,
|
||||
) : KtCapturedType(), KtFirType {
|
||||
override val coneType by weakRef(coneType)
|
||||
override fun asStringForDebugging(): String = withValidityAssertion { coneType.render() }
|
||||
}
|
||||
|
||||
|
||||
internal class KtFirTypeParameterType(
|
||||
coneType: ConeTypeParameterType,
|
||||
override val token: ValidityToken,
|
||||
|
||||
Reference in New Issue
Block a user