Ruckus
04/11/2022, 6:48 PMoperator fun <T> T.invoke(action: context(T) () -> Unit) {
action(this)
}
This works:
val action: context(String) () -> Unit = {
length
}
"Test"(action)
but inlining action
does not:
"Test" {
length // Unresolved reference: length
}
dmitriy.novozhilov
04/11/2022, 6:55 PMRuckus
04/11/2022, 7:00 PMYoussef Shoaib [MOD]
04/12/2022, 10:52 AM