[K1, K2] Use safe names when accessing to type parameters

^KT-57529 Fixed
This commit is contained in:
Ivan Kochurkin
2023-11-07 17:06:55 +01:00
parent 3188f01720
commit 64db96eda3
8 changed files with 42 additions and 3 deletions
@@ -8,6 +8,7 @@ package org.jetbrains.kotlin.fir.resolve.inference
import org.jetbrains.kotlin.fir.declarations.FirAnonymousFunction
import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol
import org.jetbrains.kotlin.fir.types.ConeTypeVariable
import org.jetbrains.kotlin.name.SpecialNames
class ConeTypeVariableForPostponedAtom(name: String) : ConeTypeVariable(name)
class ConeTypeVariableForLambdaParameterType(name: String, val index: Int) : ConeTypeVariable(name)
@@ -15,4 +16,4 @@ class ConeTypeVariableForLambdaReturnType(val argument: FirAnonymousFunction, na
class ConeTypeParameterBasedTypeVariable(
val typeParameterSymbol: FirTypeParameterSymbol
) : ConeTypeVariable(typeParameterSymbol.name.identifier, typeParameterSymbol.toLookupTag())
) : ConeTypeVariable(SpecialNames.safeIdentifier(typeParameterSymbol.name).identifier, typeParameterSymbol.toLookupTag())