Handle empty lambdas properly.

This commit is contained in:
Dmitry Petrov
2016-09-05 11:15:29 +03:00
committed by Dmitry Petrov
parent 539d7ccf6f
commit a4b9f6b215
5 changed files with 39 additions and 18 deletions
+3 -1
View File
@@ -1 +1,3 @@
val lambda = { 42 }
val test1 = { 42 }
val test2 = { }
+8 -1
View File
@@ -1,5 +1,5 @@
FILE /justLambda.kt
PROPERTY public val lambda: () -> kotlin.Int
PROPERTY public val test1: () -> kotlin.Int
EXPRESSION_BODY
BLOCK type=() -> kotlin.Int operator=LAMBDA
FUN local final fun <anonymous>(): kotlin.Int
@@ -7,3 +7,10 @@ FILE /justLambda.kt
RETURN type=kotlin.Nothing from=<anonymous>
CONST Int type=kotlin.Int value='42'
CALLABLE_REFERENCE <anonymous> type=() -> kotlin.Int operator=LAMBDA
PROPERTY public val test2: () -> kotlin.Unit
EXPRESSION_BODY
BLOCK type=() -> kotlin.Unit operator=LAMBDA
FUN local final fun <anonymous>(): kotlin.Unit
BLOCK_BODY
RETURN type=kotlin.Nothing from=<anonymous>
CALLABLE_REFERENCE <anonymous> type=() -> kotlin.Unit operator=LAMBDA