[FIR] Properly set resolvedToCompanionObject field for lhs of GetClassCall

^KT-54209 Fixed
This commit is contained in:
Dmitriy Novozhilov
2022-10-17 11:34:22 +03:00
committed by Space Team
parent 55aae5325c
commit 248c45acb3
3 changed files with 2 additions and 12 deletions
@@ -949,6 +949,7 @@ open class FirExpressionsResolveTransformer(transformer: FirBodyResolveTransform
val typeOfExpression = when (val lhs = transformedGetClassCall.argument) {
is FirResolvedQualifier -> {
lhs.replaceResolvedToCompanionObject(newResolvedToCompanionObject = false)
val symbol = lhs.symbol
val typeArguments: Array<ConeTypeProjection> =
if (lhs.typeArguments.isNotEmpty()) {
@@ -1,12 +0,0 @@
// ISSUE: KT-54209
class A {
@Deprecated("Deprecated companion")
companion object
}
fun test() {
<!DEPRECATION!>A<!>::class
A.<!DEPRECATION!>Companion<!>::class
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// ISSUE: KT-54209
class A {