Use correct check in FirSerializationPluginClassChecker to determine if the given type is a enum class.
Otherwise, findTypeSerializerOrContextUnchecked works incorrectly when analyzing code compiled with Kotlin 1.7.20 and serialization 1.4.1. #KT-57704 Fixed
This commit is contained in:
committed by
Space Team
parent
167ed5e049
commit
f29e505bd3
+1
-1
@@ -536,7 +536,7 @@ object FirSerializationPluginClassChecker : FirClassChecker() {
|
||||
}
|
||||
checkTypeArguments(type, source, reporter)
|
||||
} else {
|
||||
if (!type.isEnum) {
|
||||
if (type.toRegularClassSymbol(session)?.isEnumClass != true) {
|
||||
// enums are always serializable
|
||||
reporter.reportOn(source, FirSerializationErrors.SERIALIZER_NOT_FOUND, type)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user