Join Slack
Powered by
how can I write an extension function on `Any` tha...
# getting-started
p
poohbar
05/07/2017, 12:38 PM
how can I write an extension function on
Any
that prints
this
and then returns
this
? I tried
Copy code
fun Any?.debug(): Any? { println(this) return this }
But this now returns
Any?
and not the type of
this
.
5
Views
Open in Slack
Previous
Next