fix of kspCommonMainKotlinMetadata call

This commit is contained in:
InsanusMokrassar committed 2025-07-11 16:39:08 +06:00
1 parent 57f009e8aa
commit fa45e7b696
2 files changed
+4 -3

No files matched your search

@@ -6,9 +6,10 @@ import com.squareup.kotlinpoet.ClassName
import com.squareup.kotlinpoet.asTypeName
import kotlin.reflect.KClass
@Suppress("NOTHING_TO_INLINE")
@OptIn(KspExperimental::class)
fun KClass<*>.safeClassName() = runCatching {
asTypeName()
inline fun safeClassName(classnameGetter: () -> KClass<*>) = runCatching {
classnameGetter().asTypeName()
}.getOrElse { e ->
if (e is KSTypeNotPresentException) {
ClassName(