9fc66d686e
as without arguments by default
9 lines
165 B
Kotlin
9 lines
165 B
Kotlin
class TypeOf<T>(t: T)
|
|
|
|
fun <T> id(t: T) = t
|
|
|
|
fun foo() {
|
|
val i = id { 22 } //type inference error: no information for parameter
|
|
TypeOf(i): TypeOf<()->Int>
|
|
}
|