treat function literals without value argument list

as without arguments by default
This commit is contained in:
Svetlana Isakova
2013-10-16 19:08:22 +04:00
parent ab7e3ce78c
commit 9fc66d686e
4 changed files with 22 additions and 9 deletions
@@ -0,0 +1,8 @@
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>
}