https://kotlinlang.org logo
#kodein
Title
s

salomonbrys

06/28/2016, 12:31 PM
This code creates an unchecked cast warning but runs without issue:
Copy code
fun main(args: Array<String>) {
    val test: (Any?) -> Any = { "coucou $it" }
    val casted = test as (String) -> String
    println(casted("Jayson"))
}