https://kotlinlang.org logo
#konsist
Title
# konsist
e

Eric

03/15/2024, 6:23 PM
How can I get the package of a function parameter's type?
bareSourceType
and
sourceType
do not return the FQN
this works, but I really shouldn't have to do this
Copy code
val paramClassName =
                        "${paramType.declaration.packagee?.fullyQualifiedName.orEmpty()}.${paramType.declaration.name}"
i

igor.wojda

03/20/2024, 6:30 PM
bareSourceType
and
sourceType
don't have FQN, because Konsist API mimics constructs visible in the code. I agree that some APIs, especially ones related to new type resolution may be a bit verbose. Tell me what API would be ideal for you?