FirTypeResolver. Prohibit resolving FirResolvedTypeRef
This commit is contained in:
+1
-1
@@ -471,7 +471,7 @@ class FirTypeResolverImpl(private val session: FirSession) : FirTypeResolver() {
|
||||
supertypeSupplier: SupertypeSupplier
|
||||
): Pair<ConeKotlinType, ConeDiagnostic?> {
|
||||
return when (typeRef) {
|
||||
is FirResolvedTypeRef -> typeRef.type to null
|
||||
is FirResolvedTypeRef -> error("Do not resolve, resolved type-refs")
|
||||
is FirUserTypeRef -> {
|
||||
val (symbol, substitutor, diagnostic) = resolveToSymbol(typeRef, scopeClassDeclaration, useSiteFile, supertypeSupplier)
|
||||
resolveUserType(
|
||||
|
||||
+1
-1
@@ -401,7 +401,7 @@ open class FirSupertypeResolverVisitor(
|
||||
So we create a copy of supertypeRefs to avoid it
|
||||
*/
|
||||
supertypeRefs.createCopy().mapTo(mutableListOf()) {
|
||||
val superTypeRef = transformer.transformTypeRef(it, scopeDeclaration)
|
||||
val superTypeRef = it.transform<FirTypeRef, ScopeClassDeclaration>(transformer, scopeDeclaration)
|
||||
val typeParameterType = superTypeRef.coneTypeSafe<ConeTypeParameterType>()
|
||||
when {
|
||||
typeParameterType != null ->
|
||||
|
||||
Reference in New Issue
Block a user