This following declaration is legal in Kotlin. fun foo(): String = "foo_1" fun <T> foo(): T = "foo_2" as T …