Files
kotlin-fork/compiler/testData/ir/irText/expressions/destructuring1.txt
T
Dmitry Petrov fa4dc26814 Put 'thisReceiver' declaration in class
Interfaces also have 'thisReceiver'
2017-05-04 09:33:03 +03:00

46 lines
2.2 KiB
Plaintext
Vendored

FILE /destructuring1.kt
CLASS OBJECT A
$this: VALUE_PARAMETER this@A: A
CONSTRUCTOR private constructor A()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='A'
FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean
FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int
FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String
CLASS OBJECT B
$this: VALUE_PARAMETER this@B: B
CONSTRUCTOR private constructor B()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='B'
FUN public final operator fun A.component1(): kotlin.Int
$this: VALUE_PARAMETER this@B: B
$receiver: VALUE_PARAMETER this@component1: A
BLOCK_BODY
RETURN type=kotlin.Nothing from='component1() on A: Int'
CONST Int type=kotlin.Int value='1'
FUN public final operator fun A.component2(): kotlin.Int
$this: VALUE_PARAMETER this@B: B
$receiver: VALUE_PARAMETER this@component2: A
BLOCK_BODY
RETURN type=kotlin.Nothing from='component2() on A: Int'
CONST Int type=kotlin.Int value='2'
FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean
FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int
FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String
FUN public fun B.test(): kotlin.Unit
$receiver: VALUE_PARAMETER this@test: B
BLOCK_BODY
COMPOSITE type=kotlin.Unit origin=DESTRUCTURING_DECLARATION
VAR IR_TEMPORARY_VARIABLE val tmp0_container: A
GET_OBJECT 'A' type=A
VAR val x: kotlin.Int
CALL 'component1() on A: Int' type=kotlin.Int origin=COMPONENT_N(index=1)
$this: GET_VAR 'this@test: B' type=B origin=null
$receiver: GET_VAR 'tmp0_container: A' type=A origin=null
VAR val y: kotlin.Int
CALL 'component2() on A: Int' type=kotlin.Int origin=COMPONENT_N(index=2)
$this: GET_VAR 'this@test: B' type=B origin=null
$receiver: GET_VAR 'tmp0_container: A' type=A origin=null