mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 11:53:49 +07:00
[kotlin] KTIJ-33966 outer class access simplified
(cherry picked from commit 7ae6ce72c1569785b3335fa0705907fb0cab23c3) IJ-CR-168804 GitOrigin-RevId: 749028f5734c23f288bb6661748f6a0d6906edd5
This commit is contained in:
committed by
intellij-monorepo-bot
parent
82bdd4be8a
commit
c87323b58e
@@ -261,16 +261,15 @@ internal object CallableMetadataProvider {
|
|||||||
context(KaSession)
|
context(KaSession)
|
||||||
@OptIn(KaExperimentalApi::class)
|
@OptIn(KaExperimentalApi::class)
|
||||||
private fun buildClassType(symbol: KaClassLikeSymbol): KaType = buildClassType(symbol) {
|
private fun buildClassType(symbol: KaClassLikeSymbol): KaType = buildClassType(symbol) {
|
||||||
val parentTypeParameterCount = symbol.classId
|
val containingSymbol = if (symbol is KaNamedClassSymbol && symbol.isInner)
|
||||||
?.parentClassId
|
symbol.containingDeclaration as? KaClassSymbol
|
||||||
?.let { findClass(it) }
|
else
|
||||||
?.defaultType
|
null
|
||||||
?.expandedSymbol
|
|
||||||
?.typeParameters
|
|
||||||
?.size ?: 0
|
|
||||||
|
|
||||||
|
val times = (containingSymbol?.typeParameters?.size ?: 0) +
|
||||||
|
symbol.typeParameters.size
|
||||||
@OptIn(KaExperimentalApi::class)
|
@OptIn(KaExperimentalApi::class)
|
||||||
repeat(parentTypeParameterCount + symbol.typeParameters.size) {
|
repeat(times) {
|
||||||
argument(buildStarTypeProjection())
|
argument(buildStarTypeProjection())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user