- function with expression bodies are desugared to blocks with return statement;
- property initializers are generated as regular expression bodies.
This commit is contained in:
Dmitry Petrov
2016-08-15 13:32:48 +03:00
committed by Dmitry Petrov
parent 2707d33ca7
commit aa7bf4637b
9 changed files with 112 additions and 47 deletions
+12 -4
View File
@@ -4,16 +4,24 @@ IrFile /callWithReorderedArguments.kt
BLOCK type=kotlin.Unit hasResult=false isDesugared=false
IrFunction public fun noReorder1(): kotlin.Int
IrExpressionBody
LITERAL Int type=kotlin.Int value='1'
BLOCK type=<no-type> hasResult=false isDesugared=true
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='1'
IrFunction public fun noReorder2(): kotlin.Int
IrExpressionBody
LITERAL Int type=kotlin.Int value='2'
BLOCK type=<no-type> hasResult=false isDesugared=true
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='2'
IrFunction public fun reordered1(): kotlin.Int
IrExpressionBody
LITERAL Int type=kotlin.Int value='1'
BLOCK type=<no-type> hasResult=false isDesugared=true
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='1'
IrFunction public fun reordered2(): kotlin.Int
IrExpressionBody
LITERAL Int type=kotlin.Int value='2'
BLOCK type=<no-type> hasResult=false isDesugared=true
RETURN type=<no-type>
LITERAL Int type=kotlin.Int value='2'
IrFunction public fun test(): kotlin.Unit
IrExpressionBody
BLOCK type=kotlin.Unit hasResult=false isDesugared=false