Maciej S
07/08/2025, 8:45 AMMaciej S
07/08/2025, 8:46 AM@JvmInline
value class DummySuspendValue(val block: suspend () -> Unit)
...
val a = DummySuspendValue {}
val classifier = a::class.declaredMemberProperties.first().returnType.classifier
In the example above, classifier is null
. According to the docs, `classifier`:
Returns null if this type is not denotable in Kotlin, for example if it is an intersection type.
If I were to go by the reflection behaviour and the docs, I’d have to conclude that a suspending function type is non-denotable.
If I remove the suspend modifier like so:
@JvmInline
value class DummySuspendValue(val block: () -> Unit)
the classifier is no longer null
.
Is that expected behaviour?udalov
udalov