<@U2A92C6S1> SAM works only for java interfaces. T...
# announcements
m
@punksta SAM works only for java interfaces. There is actually no need for that. You can use just a function type like:
Copy code
fun <T> setListener(listener: ((T) -> Unit)?)

   // then use it like:
    foo.setListener<String> { stringEvent -> event.length }