[FIR] Don't check class super type annotations for loops
Only do it for typealiases. #KT-64059 Fixed
This commit is contained in:
committed by
Space Team
parent
984493fe8b
commit
242e16baea
+6
-4
@@ -721,10 +721,12 @@ open class SupertypeComputationSession {
|
||||
var isErrorInSupertypesFound = false
|
||||
val resultSupertypeRefs = mutableListOf<FirResolvedTypeRef>()
|
||||
for (supertypeRef in supertypeRefs) {
|
||||
for (annotation in supertypeRef.annotations) {
|
||||
val resolvedType = annotation.resolvedType as? ConeClassLikeType ?: continue
|
||||
val typeArgumentClassLikeDeclaration = resolvedType.lookupTag.toSymbol(session)?.fir
|
||||
checkIsInLoop(typeArgumentClassLikeDeclaration, wasSubtypingInvolved, wereTypeArgumentsInvolved)
|
||||
if (isTypeAlias) {
|
||||
for (annotation in supertypeRef.annotations) {
|
||||
val resolvedType = annotation.resolvedType as? ConeClassLikeType ?: continue
|
||||
val typeArgumentClassLikeDeclaration = resolvedType.lookupTag.toSymbol(session)?.fir
|
||||
checkIsInLoop(typeArgumentClassLikeDeclaration, wasSubtypingInvolved, wereTypeArgumentsInvolved)
|
||||
}
|
||||
}
|
||||
val supertypeFir = supertypeRef.firClassLike(session)
|
||||
checkIsInLoop(supertypeFir, isSubtypingInvolved, wereTypeArgumentsInvolved)
|
||||
|
||||
Reference in New Issue
Block a user