// "Create function 'set' from usage" "true" import java.util.ArrayList class Foo { fun x (y: Any, w: java.util.ArrayList) { y["", w] = w } } fun Any.set(s: String, w: ArrayList, value: ArrayList) { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. }