interpret block with function literal as function literal

(temporary)
This commit is contained in:
Svetlana Isakova
2013-10-10 15:25:10 +04:00
parent 73c5cb07d8
commit ab7e3ce78c
4 changed files with 51 additions and 6 deletions
@@ -0,0 +1,11 @@
fun test() {
val a = if (true) {
val x = 1
({ x })
} else {
{ 2 }
}
TypeOf(a): TypeOf<Function0<Int>>
}
class TypeOf<T>(t: T)