[Parcelize] WriteWith Parceler type argument must be subtype of property
K2 checks that the entire Parceler of the WriteWith annotation is a subtype of the expected Parceler for the property, while K1 only checks that the type argument of the WriteWith Parceler is a subtype of the property type. This mismatch leads to inconsistencies between K1 and K2 diagnostic reporting. Switch K2 to K1 behavior so diagnostics are consistent. ^KT-60019 Fixed
This commit is contained in:
@@ -317,3 +317,15 @@ fun FirRegularClassSymbol.getSuperClassSymbolOrAny(session: FirSession): FirRegu
|
||||
}
|
||||
return session.builtinTypes.anyType.type.toRegularClassSymbol(session) ?: error("Symbol for Any not found")
|
||||
}
|
||||
|
||||
fun FirClassLikeSymbol<*>.getSuperTypes(
|
||||
useSiteSession: FirSession,
|
||||
recursive: Boolean = true,
|
||||
lookupInterfaces: Boolean = true,
|
||||
substituteSuperTypes: Boolean = true,
|
||||
supertypeSupplier: SupertypeSupplier = SupertypeSupplier.Default,
|
||||
): List<ConeClassLikeType> {
|
||||
return SmartList<ConeClassLikeType>().also {
|
||||
collectSuperTypes(it, SmartSet.create(), recursive, lookupInterfaces, substituteSuperTypes, useSiteSession, supertypeSupplier)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user