class TypeOf(t: T) fun id(t: T) = t fun foo() { val i = id { 22 } //type inference error: no information for parameter TypeOf(i): TypeOf<()->Int> }