Anonymous function expressions ('fun(...) { ... }') and local functions (no closures yet).

This commit is contained in:
Dmitry Petrov
2016-08-26 12:39:27 +03:00
committed by Dmitry Petrov
parent 83c3bdd788
commit ac80195597
8 changed files with 73 additions and 3 deletions
+15
View File
@@ -0,0 +1,15 @@
FILE /localFunction.kt
FUN public fun outer(): kotlin.Unit
BLOCK_BODY
VAR var x: kotlin.Int
CONST Int type=kotlin.Int value='0'
FUN local final fun local(): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Int operator=POSTFIX_INCR
VAR val tmp0: kotlin.Int
GET_VAR x type=kotlin.Int operator=POSTFIX_INCR
SET_VAR x type=kotlin.Unit operator=POSTFIX_INCR
CALL .inc type=kotlin.Int operator=POSTFIX_INCR
$this: GET_VAR tmp0 type=kotlin.Int operator=null
GET_VAR tmp0 type=kotlin.Int operator=null
CALL .local type=kotlin.Unit operator=null