Is there any way in pure Kotlin to produce a T! type as opposed to T or T? - in other words, is the T! type denotable in Kotlin? These obviously don't work:
val t: T! = ...
fun f(): T! = ...
I'm open to (reliable) hacks.
Not currently. There was a proposal for this that was open for a few years and then declined some months after you asked this question: https://github.com/Kotlin/KEEP/issues/82.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With