fun x(s: String): Collection{} fun foo(p: Any?, p1: Any?) { for (e in x(p as String)) { print(p1!!) } p.length }