[IR] update testdata: print class name for callable references without receivers

This commit is contained in:
Zalim Bashorov
2020-11-11 17:02:39 +03:00
committed by teamcityserver
parent b6e37c1f89
commit e94528fe0d
12 changed files with 27 additions and 27 deletions
@@ -41,16 +41,16 @@ class C {
} }
) )
get(): Int { get(): Int {
return <this>.#test7$delegate.getValue<Int>(thisRef = <this>, property = ::test7) return <this>.#test7$delegate.getValue<Int>(thisRef = <this>, property = C::test7)
} }
var test8: Int /* by */ var test8: Int /* by */
field = hashMapOf<String, Int>() field = hashMapOf<String, Int>()
get(): Int { get(): Int {
return <this>.#test8$delegate.getValue<Int, Int>(thisRef = <this>, property = ::test8) return <this>.#test8$delegate.getValue<Int, Int>(thisRef = <this>, property = C::test8)
} }
set(<set-?>: Int) { set(<set-?>: Int) {
return <this>.#test8$delegate.setValue<Int>(thisRef = <this>, property = ::test8, value = <set-?>) return <this>.#test8$delegate.setValue<Int>(thisRef = <this>, property = C::test8, value = <set-?>)
} }
} }
@@ -24,16 +24,16 @@ class C {
} }
) )
get(): Int { get(): Int {
return <this>.#test2$delegate.getValue<Int>(thisRef = <this>, property = ::test2) return <this>.#test2$delegate.getValue<Int>(thisRef = <this>, property = C::test2)
} }
var test3: Any /* by */ var test3: Any /* by */
field = <this>.<get-map>() field = <this>.<get-map>()
get(): Any { get(): Any {
return <this>.#test3$delegate.getValue<Any, Any>(thisRef = <this>, property = ::test3) return <this>.#test3$delegate.getValue<Any, Any>(thisRef = <this>, property = C::test3)
} }
set(<set-?>: Any) { set(<set-?>: Any) {
return <this>.#test3$delegate.setValue<Any>(thisRef = <this>, property = ::test3, value = <set-?>) return <this>.#test3$delegate.setValue<Any>(thisRef = <this>, property = C::test3, value = <set-?>)
} }
} }
@@ -40,9 +40,9 @@ class Host {
} }
val testMember: String /* by */ val testMember: String /* by */
field = DelegateProvider(value = "OK").provideDelegate(thisRef = <this>, property = ::testMember) field = DelegateProvider(value = "OK").provideDelegate(thisRef = <this>, property = Host::testMember)
get(): String { get(): String {
return <this>.#testMember$delegate.getValue(thisRef = <this>, property = ::testMember) return <this>.#testMember$delegate.getValue(thisRef = <this>, property = Host::testMember)
} }
} }
@@ -27,9 +27,9 @@ object Host {
} }
val String.plusK: String /* by */ val String.plusK: String /* by */
field = (<this>, "K").provideDelegate(host = <this>, p = ::plusK) field = (<this>, "K").provideDelegate(host = <this>, p = Host::plusK)
get(): String { get(): String {
return <this>.#plusK$delegate.getValue(receiver = <this>, p = ::plusK) return <this>.#plusK$delegate.getValue(receiver = <this>, p = Host::plusK)
} }
val ok: String val ok: String
@@ -39,6 +39,6 @@ fun testVarargsStar() {
} }
fun testCtorStar() { fun testCtorStar() {
useKCallableStar(fn = ::<init>) useKCallableStar(fn = C::<init>)
} }
@@ -15,10 +15,10 @@ class A<T : Any?> {
} }
val test1: KFunction1<A<String>, Unit> val test1: KFunction1<A<String>, Unit>
field = ::foo field = A::foo
get get
val test2: KProperty1<A<String>, Int> val test2: KProperty1<A<String>, Int>
field = ::bar field = A::bar
get get
@@ -18,13 +18,13 @@ class Value<T : Any?> {
} }
val <T : Any?> Value<T>.additionalText: Int /* by */ val <T : Any?> Value<T>.additionalText: Int /* by */
field = DVal(kmember = ::text) field = DVal(kmember = Value::text)
get(): Int { get(): Int {
return #additionalText$delegate.getValue(t = <this>, p = ::additionalText/*<T>()*/) return #additionalText$delegate.getValue(t = <this>, p = ::additionalText/*<T>()*/)
} }
val <T : Any?> Value<T>.additionalValue: Int /* by */ val <T : Any?> Value<T>.additionalValue: Int /* by */
field = DVal(kmember = ::value) field = DVal(kmember = Value::value)
get(): Int { get(): Int {
return #additionalValue$delegate.getValue(t = <this>, p = ::additionalValue/*<T>()*/) return #additionalValue$delegate.getValue(t = <this>, p = ::additionalValue/*<T>()*/)
} }
@@ -115,18 +115,18 @@ val test_constVal: KProperty0<Int>
get get
val test_J_CONST: KProperty0<Int> val test_J_CONST: KProperty0<Int>
field = ::CONST field = J::CONST
get get
val test_J_nonConst: KMutableProperty0<Int> val test_J_nonConst: KMutableProperty0<Int>
field = ::nonConst field = J::nonConst
get get
val test_varWithPrivateSet: KProperty1<C, Int> val test_varWithPrivateSet: KProperty1<C, Int>
field = ::varWithPrivateSet field = C::varWithPrivateSet
get get
val test_varWithProtectedSet: KProperty1<C, Int> val test_varWithProtectedSet: KProperty1<C, Int>
field = ::varWithProtectedSet field = C::varWithProtectedSet
get get
@@ -26,11 +26,11 @@ val test2: KClass<out Int>
get get
val test3: KFunction1<A, Unit> val test3: KFunction1<A, Unit>
field = ::foo field = A::foo
get get
val test4: KFunction0<A> val test4: KFunction0<A>
field = ::<init> field = A::<init>
get get
val test5: KFunction0<Unit> val test5: KFunction0<Unit>
@@ -28,10 +28,10 @@ object Host {
typealias NA = Nested typealias NA = Nested
val test1: Function1<Int, C> val test1: Function1<Int, C>
field = ::<init> field = C::<init>
get get
val test2: Function1<Int, Nested> val test2: Function1<Int, Nested>
field = ::<init> field = Nested::<init>
get get
@@ -1,5 +1,5 @@
fun foo() { fun foo() {
val ref1: KProperty0<String> = ::someJavaField val ref1: KProperty0<String> = SomeJavaClass::someJavaField
val ref2: KProperty0<String> = ::someJavaField val ref2: KProperty0<String> = SomeJavaClass::someJavaField
} }
@@ -108,7 +108,7 @@ val <T : Any?> Value<T, CR<T>>.additionalText: P<T, T> /* by */
<no name provided>() <no name provided>()
} }
private get(): Any? { private get(): Any? {
return <this>.#deepO$delegate.getValue(t = <this>, p = ::deepO) /*as Any? */ return <this>.#deepO$delegate.getValue(t = <this>, p = <no name provided>::deepO) /*as Any? */
} }
private val Value<Any?, CR<Any?>>.deepK: Any? /* by */ private val Value<Any?, CR<Any?>>.deepK: Any? /* by */
@@ -129,7 +129,7 @@ val <T : Any?> Value<T, CR<T>>.additionalText: P<T, T> /* by */
<no name provided>() <no name provided>()
} }
private get(): Any? { private get(): Any? {
return <this>.#deepK$delegate.getValue(t = <this>, p = ::deepK) /*as Any? */ return <this>.#deepK$delegate.getValue(t = <this>, p = <no name provided>::deepK) /*as Any? */
} }
override operator fun getValue(t: Value<Any?, CR<Any?>>, p: KProperty<*>): P<Any?, Any?> { override operator fun getValue(t: Value<Any?, CR<Any?>>, p: KProperty<*>): P<Any?, Any?> {