denis.zharkov
fun main(args: Array<String>) { val x: Int? = foo<Int>("123") println(x ?: 0) } fun <T> foo(param: Any): T? { return param as? T }