PSI2IR KT-46069 resolve IR-based type parameter descriptors to symbols
This commit is contained in:
committed by
TeamCityServer
parent
ba80086ae3
commit
f1eeb72c01
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
|
||||
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
|
||||
import org.jetbrains.kotlin.ir.declarations.IrConstructor
|
||||
import org.jetbrains.kotlin.ir.declarations.IrTypeParametersContainer
|
||||
import org.jetbrains.kotlin.ir.descriptors.IrBasedTypeParameterDescriptor
|
||||
import org.jetbrains.kotlin.ir.expressions.IrConstructorCall
|
||||
import org.jetbrains.kotlin.ir.expressions.impl.IrConstructorCallImpl
|
||||
import org.jetbrains.kotlin.ir.symbols.IrTypeParameterSymbol
|
||||
@@ -74,6 +75,9 @@ abstract class TypeTranslator(
|
||||
}
|
||||
|
||||
private fun resolveTypeParameter(typeParameterDescriptor: TypeParameterDescriptor): IrTypeParameterSymbol {
|
||||
if (typeParameterDescriptor is IrBasedTypeParameterDescriptor) {
|
||||
return typeParameterDescriptor.owner.symbol
|
||||
}
|
||||
val originalTypeParameter = typeParameterDescriptor.originalTypeParameter
|
||||
return typeParametersResolver.resolveScopedTypeParameter(originalTypeParameter)
|
||||
?: symbolTable.referenceTypeParameter(originalTypeParameter)
|
||||
|
||||
Reference in New Issue
Block a user