Generate ir-accessors for interface properties

This commit is contained in:
Michael Bogdanov
2016-09-27 12:37:31 +03:00
committed by Dmitry Petrov
parent 011ed60eee
commit f30027b4de
7 changed files with 83 additions and 17 deletions
@@ -18,9 +18,39 @@ FILE /delegatedImplementation.kt
BLOCK_BODY
CLASS INTERFACE IOther
PROPERTY public abstract val x: kotlin.String
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <get-x>(): kotlin.String
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-x>(): String'
GET_FIELD 'x: String' type=kotlin.String origin=null
receiver: THIS of 'IOther' type=IOther
PROPERTY public abstract var y: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <get-y>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-y>(): Int'
GET_FIELD 'y: Int' type=kotlin.Int origin=null
receiver: THIS of 'IOther' type=IOther
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <set-y>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_FIELD 'y: Int' type=kotlin.Unit origin=null
receiver: THIS of 'IOther' type=IOther
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
PROPERTY public abstract val kotlin.Byte.z1: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun kotlin.Byte.<get-z1>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z1>() on Byte: Int'
GET_FIELD 'z1: Int on Byte' type=kotlin.Int origin=null
receiver: THIS of 'IOther' type=IOther
PROPERTY public abstract var kotlin.Byte.z2: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun kotlin.Byte.<get-z2>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-z2>() on Byte: Int'
GET_FIELD 'z2: Int on Byte' type=kotlin.Int origin=null
receiver: THIS of 'IOther' type=IOther
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun kotlin.Byte.<set-z2>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_FIELD 'z2: Int on Byte' type=kotlin.Unit origin=null
receiver: THIS of 'IOther' type=IOther
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
FUN public fun otherImpl(x0: kotlin.String, y0: kotlin.Int): IOther
BLOCK_BODY
RETURN type=kotlin.Nothing from='otherImpl(String, Int): IOther'
@@ -0,0 +1,8 @@
// WITH_RUNTIME
interface C {
val test1: Int
val test2: Int get() = 0
var test3: Int
var test4: Int get() = 0; set(value) {}
}
@@ -0,0 +1,31 @@
FILE /interfaceProperties.kt
CLASS INTERFACE C
PROPERTY public abstract val test1: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <get-test1>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): Int'
GET_FIELD 'test1: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C
PROPERTY public open val test2: kotlin.Int
FUN public open fun <get-test2>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): Int'
CONST Int type=kotlin.Int value='0'
PROPERTY public abstract var test3: kotlin.Int
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <get-test3>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test3>(): Int'
GET_FIELD 'test3: Int' type=kotlin.Int origin=null
receiver: THIS of 'C' type=C
FUN DEFAULT_PROPERTY_ACCESSOR public abstract fun <set-test3>(<set-?>: kotlin.Int): kotlin.Unit
BLOCK_BODY
SET_FIELD 'test3: Int' type=kotlin.Unit origin=null
receiver: THIS of 'C' type=C
value: GET_VAR 'value-parameter <set-?>: Int' type=kotlin.Int origin=null
PROPERTY public open var test4: kotlin.Int
FUN public open fun <get-test4>(): kotlin.Int
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test4>(): Int'
CONST Int type=kotlin.Int value='0'
FUN public open fun <set-test4>(value: kotlin.Int): kotlin.Unit
BLOCK_BODY