Files
kotlin-fork/compiler/testData/diagnostics/tests/functionLiterals/functionLiteralWithoutArgumentList.kt
T
Svetlana Isakova 9fc66d686e treat function literals without value argument list
as without arguments by default
2013-10-16 20:41:21 +04:00

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>
}