[IR] update testdata: super and receiver for field accesses

This commit is contained in:
Zalim Bashorov
2020-11-10 03:10:13 +03:00
committed by teamcityserver
parent 029ee6f2e7
commit a6b408978f
50 changed files with 294 additions and 294 deletions
@@ -29,22 +29,22 @@ class DFoo : IFoo {
private /*final field*/ val $$delegate_0: IFoo = d
@Ann
override fun String.testExtFun() {
(#$$delegate_0, <this>).testExtFun()
(<this>.#$$delegate_0, <this>).testExtFun()
}
@Ann
override fun testFun() {
#$$delegate_0.testFun()
<this>.#$$delegate_0.testFun()
}
override val String.testExtVal: String
override get(): String {
return (#$$delegate_0, <this>).<get-testExtVal>()
return (<this>.#$$delegate_0, <this>).<get-testExtVal>()
}
override val testVal: String
override get(): String {
return #$$delegate_0.<get-testVal>()
return <this>.#$$delegate_0.<get-testVal>()
}
}
@@ -23,7 +23,7 @@ class C {
field = 1
get
set(value: Int) {
#test4 = value
<this>.#test4 = value
}
var test5: Int
@@ -41,16 +41,16 @@ class C {
}
)
get(): Int {
return #test7$delegate.getValue<Int>(thisRef = <this>, property = ::test7)
return <this>.#test7$delegate.getValue<Int>(thisRef = <this>, property = ::test7)
}
var test8: Int /* by */
field = hashMapOf<String, Int>()
get(): Int {
return #test8$delegate.getValue<Int, Int>(thisRef = <this>, property = ::test8)
return <this>.#test8$delegate.getValue<Int, Int>(thisRef = <this>, property = ::test8)
}
set(<set-?>: Int) {
return #test8$delegate.setValue<Int>(thisRef = <this>, property = ::test8, value = <set-?>)
return <this>.#test8$delegate.setValue<Int>(thisRef = <this>, property = ::test8, value = <set-?>)
}
}
@@ -24,16 +24,16 @@ class C {
}
)
get(): Int {
return #test2$delegate.getValue<Int>(thisRef = <this>, property = ::test2)
return <this>.#test2$delegate.getValue<Int>(thisRef = <this>, property = ::test2)
}
var test3: Any /* by */
field = <this>.<get-map>()
get(): Any {
return #test3$delegate.getValue<Any, Any>(thisRef = <this>, property = ::test3)
return <this>.#test3$delegate.getValue<Any, Any>(thisRef = <this>, property = ::test3)
}
set(<set-?>: Any) {
return #test3$delegate.setValue<Any>(thisRef = <this>, property = ::test3, value = <set-?>)
return <this>.#test3$delegate.setValue<Any>(thisRef = <this>, property = ::test3, value = <set-?>)
}
}
@@ -12,12 +12,12 @@ inline class IT {
override fun toString(): String {
return "IT(" +
"x=" +
#x +
<this>.#x +
")"
}
override fun hashCode(): Int {
return #x.hashCode()
return <this>.#x.hashCode()
}
override operator fun equals(other: Any?): Boolean {
@@ -26,7 +26,7 @@ inline class IT {
}
val tmp0_other_with_cast: IT = other as IT
when {
EQEQ(arg0 = #x, arg1 = #x).not() -> return false
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
}
return true
}
@@ -92,12 +92,12 @@ inline class InlineMutableSet : MutableSet<IT> {
override fun toString(): String {
return "InlineMutableSet(" +
"ms=" +
#ms +
<this>.#ms +
")"
}
override fun hashCode(): Int {
return #ms.hashCode()
return <this>.#ms.hashCode()
}
override operator fun equals(other: Any?): Boolean {
@@ -106,7 +106,7 @@ inline class InlineMutableSet : MutableSet<IT> {
}
val tmp0_other_with_cast: InlineMutableSet = other as InlineMutableSet
when {
EQEQ(arg0 = #ms, arg1 = #ms).not() -> return false
EQEQ(arg0 = <this>.#ms, arg1 = tmp0_other_with_cast.#ms).not() -> return false
}
return true
}
+1 -1
View File
@@ -12,7 +12,7 @@ object Definitions {
get
val ktValue: String
field = #CONSTANT
field = super.#CONSTANT
get
}
+1 -1
View File
@@ -16,7 +16,7 @@ class A : I {
private /*final field*/ val $$delegate_0: I = i
override val <T : Any?> T.id: T
override get(): T {
return (#$$delegate_0, <this>).<get-id><T>()
return (<this>.#$$delegate_0, <this>).<get-id><T>()
}
}
@@ -14,33 +14,33 @@ data class Test<T : Any?> {
get
operator fun component1(): T {
return #x
return <this>.#x
}
operator fun component2(): String {
return #y
return <this>.#y
}
fun copy(x: T = #x, y: String = #y): Test<T> {
fun copy(x: T = <this>.#x, y: String = <this>.#y): Test<T> {
return Test<T>(x = x, y = y)
}
override fun toString(): String {
return "Test(" +
"x=" +
#x +
<this>.#x +
", " +
"y=" +
#y +
<this>.#y +
")"
}
override fun hashCode(): Int {
var result: Int = when {
EQEQ(arg0 = #x, arg1 = null) -> 0
true -> #x.hashCode()
EQEQ(arg0 = <this>.#x, arg1 = null) -> 0
true -> <this>.#x.hashCode()
}
result = result.times(other = 31).plus(other = #y.hashCode())
result = result.times(other = 31).plus(other = <this>.#y.hashCode())
return result
}
@@ -53,10 +53,10 @@ data class Test<T : Any?> {
}
val tmp0_other_with_cast: Test<T> = other as Test<T>
when {
EQEQ(arg0 = #x, arg1 = #x).not() -> return false
EQEQ(arg0 = <this>.#x, arg1 = tmp0_other_with_cast.#x).not() -> return false
}
when {
EQEQ(arg0 = #y, arg1 = #y).not() -> return false
EQEQ(arg0 = <this>.#y, arg1 = tmp0_other_with_cast.#y).not() -> return false
}
return true
}
@@ -16,16 +16,16 @@ class Test<TT : Any?> : IBase<TT> {
private /*final field*/ val $$delegate_0: IBase<TT> = impl
override fun <X : Any?> qux(t: TT, x: X) {
#$$delegate_0.qux<X>(t = t, x = x)
<this>.#$$delegate_0.qux<X>(t = t, x = x)
}
override fun foo(x: Int) {
#$$delegate_0.foo(x = x)
<this>.#$$delegate_0.foo(x = x)
}
override val bar: Int
override get(): Int {
return #$$delegate_0.<get-bar>()
return <this>.#$$delegate_0.<get-bar>()
}
}
@@ -42,7 +42,7 @@ class Host {
val testMember: String /* by */
field = DelegateProvider(value = "OK").provideDelegate(thisRef = <this>, property = ::testMember)
get(): String {
return #testMember$delegate.getValue(thisRef = <this>, property = ::testMember)
return <this>.#testMember$delegate.getValue(thisRef = <this>, property = ::testMember)
}
}
@@ -29,7 +29,7 @@ object Host {
val String.plusK: String /* by */
field = (<this>, "K").provideDelegate(host = <this>, p = ::plusK)
get(): String {
return #plusK$delegate.getValue(receiver = <this>, p = ::plusK)
return <this>.#plusK$delegate.getValue(receiver = <this>, p = ::plusK)
}
val ok: String