[FIR2IR] Correctly map arguments of type alias constructor call
Previously, we applied type arguments as is when converting type alias constructor calls to IR. Now, we map them using the expansion of the type alias. #KT-59743 Fixed
This commit is contained in:
committed by
Space Team
parent
b4335c86c8
commit
e35a28d36d
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.fir.declarations.utils.isLocal
|
||||
import org.jetbrains.kotlin.fir.resolve.providers.symbolProvider
|
||||
import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirConstructorSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirTypeAliasSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.LookupTagInternals
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
@@ -88,6 +89,10 @@ var FirConstructor.originalConstructorIfTypeAlias: FirConstructor? by FirDeclara
|
||||
val FirConstructorSymbol.isTypeAliasedConstructor: Boolean
|
||||
get() = fir.originalConstructorIfTypeAlias != null
|
||||
|
||||
private object TypeAliasForConstructorKey : FirDeclarationDataKey()
|
||||
|
||||
var FirConstructor.typeAliasForConstructor: FirTypeAliasSymbol? by FirDeclarationDataRegistry.data(TypeAliasForConstructorKey)
|
||||
|
||||
interface FirCodeFragmentContext {
|
||||
val towerDataContext: FirTowerDataContext
|
||||
val variables: Map<FirBasedSymbol<*>, Set<ConeKotlinType>>
|
||||
@@ -95,4 +100,4 @@ interface FirCodeFragmentContext {
|
||||
|
||||
private object CodeFragmentContextDataKey : FirDeclarationDataKey()
|
||||
|
||||
var FirCodeFragment.codeFragmentContext: FirCodeFragmentContext? by FirDeclarationDataRegistry.data(CodeFragmentContextDataKey)
|
||||
var FirCodeFragment.codeFragmentContext: FirCodeFragmentContext? by FirDeclarationDataRegistry.data(CodeFragmentContextDataKey)
|
||||
|
||||
Reference in New Issue
Block a user