From 1838bd61da47d3a64020e864f7c0f484f441b80e Mon Sep 17 00:00:00 2001 From: Drew Hamilton Date: Thu, 12 Dec 2024 15:17:45 -0800 Subject: [PATCH] Fix warning for non-custom Poko.Skip annotation during multiplatform compilation (#448) --- .../dev/drewhamilton/poko/fir/PokoFirCheckersExtension.kt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/fir/PokoFirCheckersExtension.kt b/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/fir/PokoFirCheckersExtension.kt index 91d8a8ca..9b2a957b 100644 --- a/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/fir/PokoFirCheckersExtension.kt +++ b/poko-compiler-plugin/src/main/kotlin/dev/drewhamilton/poko/fir/PokoFirCheckersExtension.kt @@ -96,8 +96,12 @@ internal class PokoFirCheckersExtension( } private fun FirAnnotation.isNestedInDefaultPokoAnnotation(): Boolean { - return annotationTypeRef.coneTypeOrNull?.classId?.outerClassId?.asFqNameString() == - DEFAULT_POKO_ANNOTATION + val outerFqName = annotationTypeRef.coneTypeOrNull!!.classId!! + .outerClassId!! + .asFqNameString() + return outerFqName == DEFAULT_POKO_ANNOTATION || + // Multiplatform FqName has "." instead of "/" for package: + outerFqName.replace(".", "/") == DEFAULT_POKO_ANNOTATION } }