IrComposite - block introducing immediate declarations to the surrounding scope.

E.g., destructuring declaration is represented as IrComposite.
This commit is contained in:
Dmitry Petrov
2016-09-09 12:15:37 +03:00
committed by Dmitry Petrov
parent aaa5fa4209
commit 838b639692
12 changed files with 132 additions and 51 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ FILE /destructuring1.kt
CONST Int type=kotlin.Int value='2'
FUN public fun B.test(): kotlin.Unit
BLOCK_BODY
BLOCK type=kotlin.Unit operator=DESTRUCTURING_DECLARATION
COMPOSITE type=kotlin.Unit operator=DESTRUCTURING_DECLARATION
VAR val tmp0_container: A
GET_OBJECT 'A' type=A
VAR val x: kotlin.Int
@@ -15,7 +15,7 @@ FILE /smartCastsWithDestructuring.kt
if: TYPE_OP operator=NOT_INSTANCEOF typeOperand=I2
GET_VAR 'value-parameter x: I1' type=I1 operator=null
then: RETURN type=kotlin.Nothing from='test(I1): Unit'
BLOCK type=kotlin.Unit operator=DESTRUCTURING_DECLARATION
COMPOSITE type=kotlin.Unit operator=DESTRUCTURING_DECLARATION
VAR val tmp0_container: I1
GET_VAR 'value-parameter x: I1' type=I1 operator=null
VAR val c1: kotlin.Int