[FIR] computeRepresentativeTypeForBareType: add missing lazy resolve
^KT-56543
This commit is contained in:
committed by
Space Team
parent
3ea1f7851b
commit
eb2cfb3d62
+5
-1
@@ -1,11 +1,12 @@
|
||||
/*
|
||||
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
|
||||
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.fir.resolve.transformers.body.resolve
|
||||
|
||||
import org.jetbrains.kotlin.fir.declarations.FirRegularClass
|
||||
import org.jetbrains.kotlin.fir.declarations.FirResolvePhase
|
||||
import org.jetbrains.kotlin.fir.declarations.FirTypeAlias
|
||||
import org.jetbrains.kotlin.fir.declarations.FirTypeParameter
|
||||
import org.jetbrains.kotlin.fir.declarations.utils.expandedConeType
|
||||
@@ -14,6 +15,7 @@ import org.jetbrains.kotlin.fir.resolve.defaultType
|
||||
import org.jetbrains.kotlin.fir.resolve.fullyExpandedType
|
||||
import org.jetbrains.kotlin.fir.resolve.toSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.impl.FirTypeParameterSymbol
|
||||
import org.jetbrains.kotlin.fir.symbols.lazyResolveToPhase
|
||||
import org.jetbrains.kotlin.fir.types.*
|
||||
import org.jetbrains.kotlin.types.AbstractTypeChecker
|
||||
|
||||
@@ -57,6 +59,8 @@ fun BodyResolveComponents.computeRepresentativeTypeForBareType(type: ConeClassLi
|
||||
}
|
||||
|
||||
private fun canBeUsedAsBareType(firTypeAlias: FirTypeAlias): Boolean {
|
||||
firTypeAlias.lazyResolveToPhase(FirResolvePhase.TYPES)
|
||||
|
||||
val typeAliasParameters = firTypeAlias.typeParameters.toSet()
|
||||
val usedTypeParameters = mutableSetOf<FirTypeParameter>()
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_REVERSED_RESOLVE
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -TOPLEVEL_TYPEALIASES_ONLY
|
||||
|
||||
typealias L<T> = List<T>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
// IGNORE_REVERSED_RESOLVE
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER -TOPLEVEL_TYPEALIASES_ONLY
|
||||
|
||||
typealias L<T> = List<T>
|
||||
|
||||
Reference in New Issue
Block a user