Files
kotlin-fork/compiler/testData/ir/irText/expressions/callableReferenceToImportedFromObject.txt
T
Dmitry Petrov 1420926a9b Generate receivers for callable references in the same way as for calls
Properly handle callable members imported from objects
and other related corner cases.

 #KT-18084 Fixed
2017-05-26 09:32:29 +03:00

66 lines
4.0 KiB
Plaintext
Vendored

FILE /callableReferenceToImportedFromObject.kt
CLASS OBJECT Foo
$this: VALUE_PARAMETER this@Foo: Foo
CONSTRUCTOR private constructor Foo()
BLOCK_BODY
DELEGATING_CONSTRUCTOR_CALL 'constructor Any()'
INSTANCE_INITIALIZER_CALL classDescriptor='Foo'
PROPERTY public final val a: kotlin.String = ""
FIELD PROPERTY_BACKING_FIELD public final val a: kotlin.String = ""
EXPRESSION_BODY
CONST String type=kotlin.String value=''
FUN DEFAULT_PROPERTY_ACCESSOR public final fun <get-a>(): kotlin.String
$this: VALUE_PARAMETER this@Foo: Foo
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-a>(): String'
GET_FIELD 'a: String' type=kotlin.String origin=null
receiver: GET_VAR 'this@Foo: Foo' type=test.Foo origin=null
FUN public final fun foo(): kotlin.String
$this: VALUE_PARAMETER this@Foo: Foo
BLOCK_BODY
RETURN type=kotlin.Nothing from='foo(): String'
CONST String type=kotlin.String value=''
FUN FAKE_OVERRIDE public open override fun equals(other: kotlin.Any?): kotlin.Boolean
$this: VALUE_PARAMETER this@Any: Any
VALUE_PARAMETER value-parameter other: kotlin.Any?
FUN FAKE_OVERRIDE public open override fun hashCode(): kotlin.Int
$this: VALUE_PARAMETER this@Any: Any
FUN FAKE_OVERRIDE public open override fun toString(): kotlin.String
$this: VALUE_PARAMETER this@Any: Any
PROPERTY public val test1: kotlin.reflect.KProperty0<kotlin.String>
FIELD PROPERTY_BACKING_FIELD public val test1: kotlin.reflect.KProperty0<kotlin.String>
EXPRESSION_BODY
PROPERTY_REFERENCE 'a: String' field=null getter='<get-a>(): String' setter=null type=kotlin.reflect.KProperty0<kotlin.String> origin=null
$this: GET_OBJECT 'Foo' type=test.Foo
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test1>(): kotlin.reflect.KProperty0<kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1>(): KProperty0<String>'
GET_FIELD 'test1: KProperty0<String>' type=kotlin.reflect.KProperty0<kotlin.String> origin=null
PROPERTY public val test1a: kotlin.reflect.KProperty0<kotlin.String>
FIELD PROPERTY_BACKING_FIELD public val test1a: kotlin.reflect.KProperty0<kotlin.String>
EXPRESSION_BODY
PROPERTY_REFERENCE 'a: String' field=null getter='<get-a>(): String' setter=null type=kotlin.reflect.KProperty0<kotlin.String> origin=null
$this: GET_OBJECT 'Foo' type=test.Foo
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test1a>(): kotlin.reflect.KProperty0<kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test1a>(): KProperty0<String>'
GET_FIELD 'test1a: KProperty0<String>' type=kotlin.reflect.KProperty0<kotlin.String> origin=null
PROPERTY public val test2: kotlin.reflect.KFunction0<kotlin.String>
FIELD PROPERTY_BACKING_FIELD public val test2: kotlin.reflect.KFunction0<kotlin.String>
EXPRESSION_BODY
FUNCTION_REFERENCE 'foo(): String' type=kotlin.reflect.KFunction0<kotlin.String> origin=null
$this: GET_OBJECT 'Foo' type=test.Foo
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test2>(): kotlin.reflect.KFunction0<kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2>(): KFunction0<String>'
GET_FIELD 'test2: KFunction0<String>' type=kotlin.reflect.KFunction0<kotlin.String> origin=null
PROPERTY public val test2a: kotlin.reflect.KFunction0<kotlin.String>
FIELD PROPERTY_BACKING_FIELD public val test2a: kotlin.reflect.KFunction0<kotlin.String>
EXPRESSION_BODY
FUNCTION_REFERENCE 'foo(): String' type=kotlin.reflect.KFunction0<kotlin.String> origin=null
$this: GET_OBJECT 'Foo' type=test.Foo
FUN DEFAULT_PROPERTY_ACCESSOR public fun <get-test2a>(): kotlin.reflect.KFunction0<kotlin.String>
BLOCK_BODY
RETURN type=kotlin.Nothing from='<get-test2a>(): KFunction0<String>'
GET_FIELD 'test2a: KFunction0<String>' type=kotlin.reflect.KFunction0<kotlin.String> origin=null