[IR] update testdata: better support for IrConstructorCall

This commit is contained in:
Zalim Bashorov
2020-11-06 01:22:57 +03:00
committed by teamcityserver
parent 197f5ca885
commit 2a19dc32f2
70 changed files with 172 additions and 136 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ class OC : I {
}
protected override fun clone(): OC {
return TODO("IrConstructorCall")
return OC()
}
@@ -78,7 +78,7 @@ data class Test1 {
}
fun copy(stringArray: Array<String> = #stringArray, charArray: CharArray = #charArray, booleanArray: BooleanArray = #booleanArray, byteArray: ByteArray = #byteArray, shortArray: ShortArray = #shortArray, intArray: IntArray = #intArray, longArray: LongArray = #longArray, floatArray: FloatArray = #floatArray, doubleArray: DoubleArray = #doubleArray): Test1 {
return TODO("IrConstructorCall")
return Test1(stringArray = stringArray, charArray = charArray, booleanArray = booleanArray, byteArray = byteArray, shortArray = shortArray, intArray = intArray, longArray = longArray, floatArray = floatArray, doubleArray = doubleArray)
}
override fun toString(): String {
@@ -181,7 +181,7 @@ data class Test2<T : Any?> {
}
fun copy(genericArray: Array<T> = #genericArray): Test2<T> {
return TODO("IrConstructorCall")
return Test2<T>(genericArray = genericArray)
}
override fun toString(): String {
@@ -227,7 +227,7 @@ data class Test3 {
}
fun copy(anyArrayN: Array<Any>? = #anyArrayN): Test3 {
return TODO("IrConstructorCall")
return Test3(anyArrayN = anyArrayN)
}
override fun toString(): String {
+3 -3
View File
@@ -30,7 +30,7 @@ data class Test1 {
}
fun copy(x: Int = #x, y: String = #y, z: Any = #z): Test1 {
return TODO("IrConstructorCall")
return Test1(x = x, y = y, z = z)
}
override fun toString(): String {
@@ -91,7 +91,7 @@ data class Test2 {
}
fun copy(x: Any? = #x): Test2 {
return TODO("IrConstructorCall")
return Test2(x = x)
}
override fun toString(): String {
@@ -164,7 +164,7 @@ data class Test3 {
}
fun copy(d: Double = #d, dn: Double? = #dn, f: Float = #f, df: Float? = #df): Test3 {
return TODO("IrConstructorCall")
return Test3(d = d, dn = dn, f = f, df = df)
}
override fun toString(): String {
@@ -14,7 +14,7 @@ data class Test1<T : Any?> {
}
fun copy(x: T = #x): Test1<T> {
return TODO("IrConstructorCall")
return Test1<T>(x = x)
}
override fun toString(): String {
@@ -63,7 +63,7 @@ data class Test2<T : Number> {
}
fun copy(x: T = #x): Test2<T> {
return TODO("IrConstructorCall")
return Test2<T>(x = x)
}
override fun toString(): String {
@@ -109,7 +109,7 @@ data class Test3<T : Any?> {
}
fun copy(x: List<T> = #x): Test3<T> {
return TODO("IrConstructorCall")
return Test3<T>(x = x)
}
override fun toString(): String {
@@ -155,7 +155,7 @@ data class Test4 {
}
fun copy(x: List<String> = #x): Test4 {
return TODO("IrConstructorCall")
return Test4(x = x)
}
override fun toString(): String {
@@ -85,7 +85,7 @@ fun otherImpl(x0: String, y0: Int): IOther {
}
TODO("IrConstructorCall")
<no name provided>()
}
}
@@ -70,7 +70,7 @@ class TestJFoo : IFoo {
}
private /*final field*/ val $$delegate_0: JFoo = TODO("IrConstructorCall")
private /*final field*/ val $$delegate_0: JFoo = JFoo()
override fun foo(): String {
return #$$delegate_0.foo() /*!! String */
}
@@ -87,7 +87,7 @@ class TestK1 : IFoo {
}
private /*final field*/ val $$delegate_0: K1 = TODO("IrConstructorCall")
private /*final field*/ val $$delegate_0: K1 = K1()
override fun foo(): String {
return #$$delegate_0.foo() /*!! String */
}
@@ -104,7 +104,7 @@ class TestK2 : IFoo {
}
private /*final field*/ val $$delegate_0: K2 = TODO("IrConstructorCall")
private /*final field*/ val $$delegate_0: K2 = K2()
override fun foo(): String {
return #$$delegate_0.foo()
}
@@ -121,7 +121,7 @@ class TestK3 : IFoo {
}
private /*final field*/ val $$delegate_0: K3 = TODO("IrConstructorCall")
private /*final field*/ val $$delegate_0: K3 = K3()
override fun foo(): String {
return #$$delegate_0.foo()
}
@@ -138,7 +138,7 @@ class TestK4 : IFoo {
}
private /*final field*/ val $$delegate_0: K4 = TODO("IrConstructorCall")
private /*final field*/ val $$delegate_0: K4 = K4()
override fun foo(): String {
return #$$delegate_0.foo() /*!! String */
}
@@ -57,7 +57,7 @@ inline class IC<TT : Any?> {
}
fun box(): String {
val ic: IC<Int> = TODO("IrConstructorCall")
val ic: IC<Int> = IC<Int>(c = C<Int>(t = 42))
when {
EQEQ(arg0 = ic.foo(), arg1 = 42).not() -> return "FAIL"
}
+1 -1
View File
@@ -14,7 +14,7 @@ data class TestData {
}
fun copy(nn: Nothing? = #nn): TestData {
return TODO("IrConstructorCall")
return TestData(nn = nn)
}
override fun toString(): String {
@@ -17,7 +17,7 @@ data class A {
}
fun copy(runA: @ExtensionFunctionType Function2<A, String, Unit> = #runA): A {
return TODO("IrConstructorCall")
return A(runA = runA)
}
override fun toString(): String {
@@ -62,7 +62,7 @@ data class B {
}
TODO("IrConstructorCall")
<no name provided>()
}) /* primary */ {
TODO("IrDelegatingConstructorCall")
/* InstanceInitializerCall */
@@ -78,7 +78,7 @@ data class B {
}
fun copy(x: Any = #x): B {
return TODO("IrConstructorCall")
return B(x = x)
}
override fun toString(): String {
+1 -1
View File
@@ -15,6 +15,6 @@ fun outer() {
}
TODO("IrConstructorCall").foo()
LocalClass().foo()
}
@@ -20,7 +20,7 @@ val test1: Any
}
TODO("IrConstructorCall")
<no name provided>()
}
get
@@ -43,7 +43,7 @@ val test2: IFoo
}
TODO("IrConstructorCall")
<no name provided>()
}
get
@@ -86,7 +86,7 @@ class Outer {
}
TODO("IrConstructorCall")
<no name provided>()
}
}
@@ -114,7 +114,7 @@ fun Outer.test4(): Inner {
}
TODO("IrConstructorCall")
<no name provided>()
}
}