[IR] update testdata: better support for IrConstructorCall
This commit is contained in:
committed by
teamcityserver
parent
197f5ca885
commit
2a19dc32f2
Vendored
+1
-1
@@ -37,7 +37,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> = TODO("IrConstructorCall")
|
||||
val z: Foo<String> = Foo<String>()
|
||||
val foo: Inner<String, String> = foo<String, String>(a = "O", b = "K", x = ::<init>)
|
||||
return foo.<get-a>().plus(other = foo.<get-b>())
|
||||
}
|
||||
|
||||
Vendored
+3
-3
@@ -40,7 +40,7 @@ class Outer {
|
||||
|
||||
fun testConstructor(): Any {
|
||||
return use(fn = local fun <init>(p0: Int): C {
|
||||
return TODO("IrConstructorCall")
|
||||
return C(xs = [p0])
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -48,7 +48,7 @@ fun testConstructor(): Any {
|
||||
fun testInnerClassConstructor(outer: Outer): Any {
|
||||
return use(fn = { // BLOCK
|
||||
local fun Outer.<init>(p0: Int): Inner {
|
||||
return TODO("IrConstructorCall")
|
||||
return receiver.Inner(xs = [p0])
|
||||
}
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ fun testInnerClassConstructor(outer: Outer): Any {
|
||||
fun testInnerClassConstructorCapturingOuter(): Any {
|
||||
return use(fn = { // BLOCK
|
||||
local fun Outer.<init>(p0: Int): Inner {
|
||||
return TODO("IrConstructorCall")
|
||||
return receiver.Inner(xs = [p0])
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ fun testFn(): Any {
|
||||
|
||||
fun testCtor(): Any {
|
||||
return use(fn = local fun <init>(): C {
|
||||
return TODO("IrConstructorCall")
|
||||
return C()
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -25,7 +25,7 @@ class Host {
|
||||
}
|
||||
|
||||
fun testBoundReceiverLocalVal() {
|
||||
val h: Host = TODO("IrConstructorCall")
|
||||
val h: Host = Host()
|
||||
use(fn = { // BLOCK
|
||||
local fun Host.withVararg(p0: Int) {
|
||||
receiver.withVararg(xs = [p0]) /*~> Unit */
|
||||
@@ -37,7 +37,7 @@ class Host {
|
||||
}
|
||||
|
||||
fun testBoundReceiverLocalVar() {
|
||||
var h: Host = TODO("IrConstructorCall")
|
||||
var h: Host = Host()
|
||||
use(fn = { // BLOCK
|
||||
local fun Host.withVararg(p0: Int) {
|
||||
receiver.withVararg(xs = [p0]) /*~> Unit */
|
||||
|
||||
+4
-1
@@ -11,7 +11,10 @@ fun sum(vararg args: Int): Int {
|
||||
}
|
||||
|
||||
fun nsum(vararg args: Number): Int {
|
||||
return sum(args = [*TODO("IrConstructorCall")])
|
||||
return sum(args = [*IntArray(size = args.<get-size>(), init = local fun <anonymous>(it: Int): Int {
|
||||
return args.get(index = it).toInt()
|
||||
}
|
||||
)])
|
||||
}
|
||||
|
||||
fun zap(vararg b: String, k: Int = 42) {
|
||||
|
||||
Reference in New Issue
Block a user