[IR] update testdata: better support for callable references

This commit is contained in:
Zalim Bashorov
2020-11-11 16:10:20 +03:00
committed by teamcityserver
parent 0d3d61862b
commit 8f155c23a0
16 changed files with 47 additions and 47 deletions
@@ -26,9 +26,9 @@ object Delegate {
var <T : Any?> C<T>.genericDelegatedProperty: Int /* by */
field = Delegate
get(): Int {
return #genericDelegatedProperty$delegate.getValue(thisRef = <this>, kProp = ::genericDelegatedProperty)
return #genericDelegatedProperty$delegate.getValue(thisRef = <this>, kProp = ::genericDelegatedProperty/*<T>()*/)
}
set(<set-?>: Int) {
return #genericDelegatedProperty$delegate.setValue(thisRef = <this>, kProp = ::genericDelegatedProperty, newValue = <set-?>)
return #genericDelegatedProperty$delegate.setValue(thisRef = <this>, kProp = ::genericDelegatedProperty/*<T>()*/, newValue = <set-?>)
}
@@ -18,14 +18,14 @@ fun A.qux() {
}
val test1: KFunction0<Unit>
field = ::foo
field = A()::foo
get
val test2: KProperty0<Int>
field = ::bar
field = A()::bar
get
val test3: KFunction0<Unit>
field = ::qux
field = A()::qux
get
@@ -13,7 +13,7 @@ fun test() {
receiver.id() /*~> Unit */
}
::id
"Fail"::id
})
}
@@ -32,7 +32,7 @@ inline fun <A : Any?, B : Any?> foo(a: A, b: B, x: Function2<A, B, Inner<B, A>>)
fun box(): String {
val z: Foo<String> = Foo<String>()
val foo: Inner<String, String> = foo<String, String>(a = "O", b = "K", x = ::<init>)
val foo: Inner<String, String> = foo<String, String>(a = "O", b = "K", x = z::<init>/*<String>()*/)
return foo.<get-a>().plus(other = foo.<get-b>())
}
@@ -42,7 +42,7 @@ fun testInnerClassConstructor(outer: Outer): Any {
return receiver.Inner(xs = [p0])
}
::<init>
outer::<init>
})
}
@@ -52,7 +52,7 @@ fun testInnerClassConstructorCapturingOuter(): Any {
return receiver.Inner(xs = [p0])
}
::<init>
Outer()::<init>
})
}
@@ -18,18 +18,18 @@ object Foo {
}
val test1: KProperty0<String>
field = ::a
field = Foo::a
get
val test1a: KProperty0<String>
field = ::a
field = Foo::a
get
val test2: KFunction0<String>
field = ::foo
field = Foo::foo
get
val test2a: KFunction0<String>
field = ::foo
field = Foo::foo
get
@@ -94,7 +94,7 @@ fun testWithBoundReceiver() {
receiver.bar()
}
::bar
C()::bar
})
}
@@ -17,14 +17,14 @@ inline fun <reified T : Any?> topLevel2(x: List<T>) {
}
val test1: Function1<Int, Unit>
field = ::topLevel1
field = ::topLevel1/*<Int>()*/
get
val test2: Function1<List<String>, Unit>
field = ::topLevel2
field = ::topLevel2/*<String>()*/
get
val test3: Function1<Int, Unit>
field = ::objectMember
field = Host::objectMember/*<Int>()*/
get
@@ -43,7 +43,7 @@ fun testBound(a: A) {
receiver.foo(xs = [p0]) /*~> Unit */
}
::foo
a::foo
})
}
@@ -53,7 +53,7 @@ fun testObject() {
receiver.foo(xs = [p0]) /*~> Unit */
}
::foo
Obj::foo
})
}
@@ -61,7 +61,7 @@ fun testImportedObjectMember(): String {
return importedObjectMemberWithVarargs(xs = [p0])
}
::importedObjectMemberWithVarargs
Host::importedObjectMemberWithVarargs
})
}
@@ -19,7 +19,7 @@ class Host {
receiver.withVararg(xs = [p0]) /*~> Unit */
}
::withVararg
<this>::withVararg
})
}
@@ -30,7 +30,7 @@ class Host {
receiver.withVararg(xs = [p0]) /*~> Unit */
}
::withVararg
h::withVararg
})
}
@@ -41,7 +41,7 @@ class Host {
receiver.withVararg(xs = [p0]) /*~> Unit */
}
::withVararg
h::withVararg
})
}
@@ -51,7 +51,7 @@ class Host {
receiver.withVararg(xs = [p0]) /*~> Unit */
}
::withVararg
h::withVararg
})
}
@@ -61,7 +61,7 @@ class Host {
receiver.withVararg(xs = [p0]) /*~> Unit */
}
::withVararg
Host()::withVararg
})
}
@@ -20,13 +20,13 @@ class Value<T : Any?> {
val <T : Any?> Value<T>.additionalText: Int /* by */
field = DVal(kmember = ::text)
get(): Int {
return #additionalText$delegate.getValue(t = <this>, p = ::additionalText)
return #additionalText$delegate.getValue(t = <this>, p = ::additionalText/*<T>()*/)
}
val <T : Any?> Value<T>.additionalValue: Int /* by */
field = DVal(kmember = ::value)
get(): Int {
return #additionalValue$delegate.getValue(t = <this>, p = ::additionalValue)
return #additionalValue$delegate.getValue(t = <this>, p = ::additionalValue/*<T>()*/)
}
class DVal {
@@ -66,6 +66,6 @@ var <T : Any?> T.bar: T
}
val barRef: KMutableProperty1<String?, String?>
field = ::bar
field = ::bar/*<String?>()*/
get
@@ -34,7 +34,7 @@ val test4: KFunction0<A>
get
val test5: KFunction0<Unit>
field = ::foo
field = A()::foo
get
val test6: KFunction0<Unit>
@@ -26,7 +26,7 @@ fun testSimple(fn: Function0<Unit>) {
callee.invoke()
}
::suspendConversion0
fn::suspendConversion0
})
}
@@ -36,7 +36,7 @@ fun testSimpleNonVal() {
callee.invoke()
}
::suspendConversion0
produceFun()::suspendConversion0
})
}
@@ -46,7 +46,7 @@ fun testExtAsExt(fn: @ExtensionFunctionType Function1<Int, Unit>) {
callee.invoke(p1 = p0)
}
::suspendConversion0
fn::suspendConversion0
})
}
@@ -56,7 +56,7 @@ fun testExtAsSimple(fn: @ExtensionFunctionType Function1<Int, Unit>) {
callee.invoke(p1 = p0)
}
::suspendConversion0
fn::suspendConversion0
})
}
@@ -66,7 +66,7 @@ fun testSimpleAsExt(fn: Function1<Int, Unit>) {
callee.invoke(p1 = p0)
}
::suspendConversion0
fn::suspendConversion0
})
}
@@ -76,7 +76,7 @@ fun testSimpleAsSimpleT(fn: Function1<Int, Unit>) {
callee.invoke(p1 = p0)
}
::suspendConversion0
fn::suspendConversion0
})
}
@@ -86,7 +86,7 @@ fun testSimpleAsExtT(fn: Function1<Int, Unit>) {
callee.invoke(p1 = p0)
}
::suspendConversion0
fn::suspendConversion0
})
}
@@ -96,7 +96,7 @@ fun testExtAsSimpleT(fn: @ExtensionFunctionType Function1<Int, Unit>) {
callee.invoke(p1 = p0)
}
::suspendConversion0
fn::suspendConversion0
})
}
@@ -106,7 +106,7 @@ fun testExtAsExtT(fn: @ExtensionFunctionType Function1<Int, Unit>) {
callee.invoke(p1 = p0)
}
::suspendConversion0
fn::suspendConversion0
})
}
@@ -116,7 +116,7 @@ fun <S : Any?> testSimpleSAsSimpleT(fn: Function1<S, Unit>) {
callee.invoke(p1 = p0)
}
::suspendConversion0
fn::suspendConversion0
})
}
@@ -126,7 +126,7 @@ fun <S : Any?> testSimpleSAsExtT(fn: Function1<S, Unit>) {
callee.invoke(p1 = p0)
}
::suspendConversion0
fn::suspendConversion0
})
}
@@ -136,7 +136,7 @@ fun <S : Any?> testExtSAsSimpleT(fn: @ExtensionFunctionType Function1<S, Unit>)
callee.invoke(p1 = p0)
}
::suspendConversion0
fn::suspendConversion0
})
}
@@ -146,7 +146,7 @@ fun <S : Any?> testExtSAsExtT(fn: @ExtensionFunctionType Function1<S, Unit>) {
callee.invoke(p1 = p0)
}
::suspendConversion0
fn::suspendConversion0
})
}
@@ -157,7 +157,7 @@ fun testSmartCastWithSuspendConversion(a: Any) {
callee.invoke()
}
::suspendConversion0
a::suspendConversion0
})
}
@@ -169,7 +169,7 @@ fun testSmartCastOnVarWithSuspendConversion(a: Any) {
callee.invoke()
}
::suspendConversion0
b::suspendConversion0
})
}
@@ -141,6 +141,6 @@ val <T : Any?> Value<T, CR<T>>.additionalText: P<T, T> /* by */
<no name provided>()
}
get(): P<T, T> {
return #additionalText$delegate.getValue(t = <this>, p = ::additionalText)
return #additionalText$delegate.getValue(t = <this>, p = ::additionalText/*<T>()*/)
}
@@ -24,11 +24,11 @@ fun use(p: KMutableProperty<String>) {
}
fun test1() {
use(p = ::y)
use(p = C<String>(x = "abc")::y/*<String>()*/)
}
fun test2(a: Any) {
a as C<String> /*~> Unit */
use(p = ::y)
use(p = a /*as C<String> */::y/*<String>()*/)
}