From 2a19dc32f29f898a9247f42429b5c47beb34e559 Mon Sep 17 00:00:00 2001 From: Zalim Bashorov Date: Fri, 6 Nov 2020 01:22:57 +0300 Subject: [PATCH] [IR] update testdata: better support for IrConstructorCall --- .../ir/irText/classes/cloneable.kt.txt | 2 +- .../classes/dataClassWithArrayMembers.kt.txt | 6 ++-- .../ir/irText/classes/dataClasses.kt.txt | 6 ++-- .../irText/classes/dataClassesGeneric.kt.txt | 8 ++--- .../classes/delegatedImplementation.kt.txt | 2 +- ...citNotNullOnDelegatedImplementation.kt.txt | 10 +++--- .../inlineClassSyntheticMethods.kt.txt | 2 +- .../testData/ir/irText/classes/kt31649.kt.txt | 2 +- .../lambdaInDataClassDefaultParameter.kt.txt | 6 ++-- .../ir/irText/classes/localClasses.kt.txt | 2 +- .../classes/objectLiteralExpressions.kt.txt | 8 ++--- ...tedPropertyAccessorsWithAnnotations.kt.txt | 4 +-- .../parameters/dataClassMembers.kt.txt | 2 +- .../provideDelegate/differentReceivers.kt.txt | 2 +- .../declarations/provideDelegate/local.kt.txt | 4 +-- .../localDifferentReceivers.kt.txt | 2 +- .../provideDelegate/member.kt.txt | 4 +-- .../provideDelegate/memberExtension.kt.txt | 2 +- .../provideDelegate/topLevel.kt.txt | 4 +-- .../expressions/augmentedAssignment2.kt.txt | 4 +-- .../augmentedAssignmentWithExpression.kt.txt | 2 +- .../expressions/breakContinueInWhen.kt.txt | 12 +++++-- .../boundInnerGenericConstructor.kt.txt | 2 +- .../constructorWithAdaptedArguments.kt.txt | 6 ++-- .../callableReferences/kt37131.kt.txt | 2 +- .../withArgumentAdaptationAndReceiver.kt.txt | 4 +-- .../withVarargViewedAsArray.kt.txt | 5 ++- .../irText/expressions/classReference.kt.txt | 4 +-- .../complexAugmentedAssignment.kt.txt | 2 +- ...onstructorWithOwnTypeParametersCall.kt.txt | 4 +-- .../irText/expressions/contructorCall.kt.txt | 2 +- .../forWithImplicitReceivers.kt.txt | 2 +- .../funInterface/partialSam.kt.txt | 4 +-- ...ricConstructorCallWithTypeArguments.kt.txt | 7 ++-- .../expressions/genericPropertyRef.kt.txt | 4 +-- .../jvmFieldWithIntersectionTypes.kt.txt | 8 ++--- .../ir/irText/expressions/kt16904.kt.txt | 2 +- .../ir/irText/expressions/kt16905.kt.txt | 2 +- .../ir/irText/expressions/kt30796.kt.txt | 2 +- .../ir/irText/expressions/kt36956.kt.txt | 2 +- .../expressions/memberTypeArguments.kt.txt | 2 +- .../expressions/multipleThisReferences.kt.txt | 2 +- .../irText/expressions/objectReference.kt.txt | 2 +- .../sam/arrayAsVarargAfterSamArgument.kt.txt | 36 +++++++++++++++---- ...mConversionInGenericConstructorCall.kt.txt | 4 +-- ...nversionInGenericConstructorCall_NI.kt.txt | 8 ++--- .../sam/samConversionsWithSmartCasts.kt.txt | 18 +++++----- ...specializedTypeAliasConstructorCall.kt.txt | 2 +- .../thisOfGenericOuterClass.kt.txt | 2 +- .../thisReferenceBeforeClassDeclared.kt.txt | 4 +-- .../ir/irText/expressions/throw.kt.txt | 2 +- .../ClashResolutionDescriptor.kt.txt | 2 +- .../firProblems/InnerClassInAnonymous.kt.txt | 4 +-- .../ir/irText/firProblems/MultiList.kt.txt | 2 +- .../irText/firProblems/SignatureClash.kt.txt | 2 +- .../irText/firProblems/v8arrayToList.kt.txt | 2 +- .../lambdas/destructuringInLambda.kt.txt | 2 +- .../irText/regressions/coercionInLoop.kt.txt | 2 +- .../typeAliasCtorForGenericClass.kt.txt | 4 +-- .../ir/irText/stubs/builtinMap.kt.txt | 2 +- .../javaConstructorWithTypeParameters.kt.txt | 8 ++--- .../ir/irText/stubs/javaInnerClass.kt.txt | 2 +- .../irText/stubs/javaSyntheticProperty.kt.txt | 2 +- .../castsInsideCoroutineInference.kt.txt | 6 ++-- .../types/genericDelegatedDeepProperty.kt.txt | 8 ++--- .../irText/types/intersectionType1_NI.kt.txt | 4 +-- .../irText/types/intersectionType1_OI.kt.txt | 4 +-- .../irText/types/intersectionType2_NI.kt.txt | 4 +-- .../irText/types/intersectionType2_OI.kt.txt | 4 +-- .../enhancedNullabilityInForLoop.kt.txt | 2 +- 70 files changed, 172 insertions(+), 136 deletions(-) diff --git a/compiler/testData/ir/irText/classes/cloneable.kt.txt b/compiler/testData/ir/irText/classes/cloneable.kt.txt index 52bc36eeb0c..118dad1ff6c 100644 --- a/compiler/testData/ir/irText/classes/cloneable.kt.txt +++ b/compiler/testData/ir/irText/classes/cloneable.kt.txt @@ -39,7 +39,7 @@ class OC : I { } protected override fun clone(): OC { - return TODO("IrConstructorCall") + return OC() } diff --git a/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt.txt b/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt.txt index 627395f11ae..777980d7c9a 100644 --- a/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.kt.txt @@ -78,7 +78,7 @@ data class Test1 { } fun copy(stringArray: Array = #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 { } fun copy(genericArray: Array = #genericArray): Test2 { - return TODO("IrConstructorCall") + return Test2(genericArray = genericArray) } override fun toString(): String { @@ -227,7 +227,7 @@ data class Test3 { } fun copy(anyArrayN: Array? = #anyArrayN): Test3 { - return TODO("IrConstructorCall") + return Test3(anyArrayN = anyArrayN) } override fun toString(): String { diff --git a/compiler/testData/ir/irText/classes/dataClasses.kt.txt b/compiler/testData/ir/irText/classes/dataClasses.kt.txt index 2f90fd974eb..b0998ba1ee4 100644 --- a/compiler/testData/ir/irText/classes/dataClasses.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClasses.kt.txt @@ -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 { diff --git a/compiler/testData/ir/irText/classes/dataClassesGeneric.kt.txt b/compiler/testData/ir/irText/classes/dataClassesGeneric.kt.txt index 09d3531af7e..94a9694adcb 100644 --- a/compiler/testData/ir/irText/classes/dataClassesGeneric.kt.txt +++ b/compiler/testData/ir/irText/classes/dataClassesGeneric.kt.txt @@ -14,7 +14,7 @@ data class Test1 { } fun copy(x: T = #x): Test1 { - return TODO("IrConstructorCall") + return Test1(x = x) } override fun toString(): String { @@ -63,7 +63,7 @@ data class Test2 { } fun copy(x: T = #x): Test2 { - return TODO("IrConstructorCall") + return Test2(x = x) } override fun toString(): String { @@ -109,7 +109,7 @@ data class Test3 { } fun copy(x: List = #x): Test3 { - return TODO("IrConstructorCall") + return Test3(x = x) } override fun toString(): String { @@ -155,7 +155,7 @@ data class Test4 { } fun copy(x: List = #x): Test4 { - return TODO("IrConstructorCall") + return Test4(x = x) } override fun toString(): String { diff --git a/compiler/testData/ir/irText/classes/delegatedImplementation.kt.txt b/compiler/testData/ir/irText/classes/delegatedImplementation.kt.txt index 1bb1fe367b4..ff0bd6541fd 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementation.kt.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementation.kt.txt @@ -85,7 +85,7 @@ fun otherImpl(x0: String, y0: Int): IOther { } - TODO("IrConstructorCall") + () } } diff --git a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.kt.txt b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.kt.txt index 815218a77c3..2b8b02ffb3c 100644 --- a/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.kt.txt +++ b/compiler/testData/ir/irText/classes/implicitNotNullOnDelegatedImplementation.kt.txt @@ -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 */ } diff --git a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt.txt b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt.txt index ca2844cba72..ef74f18ac2b 100644 --- a/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt.txt +++ b/compiler/testData/ir/irText/classes/inlineClassSyntheticMethods.kt.txt @@ -57,7 +57,7 @@ inline class IC { } fun box(): String { - val ic: IC = TODO("IrConstructorCall") + val ic: IC = IC(c = C(t = 42)) when { EQEQ(arg0 = ic.foo(), arg1 = 42).not() -> return "FAIL" } diff --git a/compiler/testData/ir/irText/classes/kt31649.kt.txt b/compiler/testData/ir/irText/classes/kt31649.kt.txt index 2cb80495b4c..87269fe8b44 100644 --- a/compiler/testData/ir/irText/classes/kt31649.kt.txt +++ b/compiler/testData/ir/irText/classes/kt31649.kt.txt @@ -14,7 +14,7 @@ data class TestData { } fun copy(nn: Nothing? = #nn): TestData { - return TODO("IrConstructorCall") + return TestData(nn = nn) } override fun toString(): String { diff --git a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt.txt b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt.txt index 75a2bdf6f53..e859d69fc58 100644 --- a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt.txt +++ b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.kt.txt @@ -17,7 +17,7 @@ data class A { } fun copy(runA: @ExtensionFunctionType Function2 = #runA): A { - return TODO("IrConstructorCall") + return A(runA = runA) } override fun toString(): String { @@ -62,7 +62,7 @@ data class B { } - TODO("IrConstructorCall") + () }) /* 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 { diff --git a/compiler/testData/ir/irText/classes/localClasses.kt.txt b/compiler/testData/ir/irText/classes/localClasses.kt.txt index 5db69d14320..1f6a1e03773 100644 --- a/compiler/testData/ir/irText/classes/localClasses.kt.txt +++ b/compiler/testData/ir/irText/classes/localClasses.kt.txt @@ -15,6 +15,6 @@ fun outer() { } - TODO("IrConstructorCall").foo() + LocalClass().foo() } diff --git a/compiler/testData/ir/irText/classes/objectLiteralExpressions.kt.txt b/compiler/testData/ir/irText/classes/objectLiteralExpressions.kt.txt index 7e0a87fe7cf..402c0fc06b7 100644 --- a/compiler/testData/ir/irText/classes/objectLiteralExpressions.kt.txt +++ b/compiler/testData/ir/irText/classes/objectLiteralExpressions.kt.txt @@ -20,7 +20,7 @@ val test1: Any } - TODO("IrConstructorCall") + () } get @@ -43,7 +43,7 @@ val test2: IFoo } - TODO("IrConstructorCall") + () } get @@ -86,7 +86,7 @@ class Outer { } - TODO("IrConstructorCall") + () } } @@ -114,7 +114,7 @@ fun Outer.test4(): Inner { } - TODO("IrConstructorCall") + () } } diff --git a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.kt.txt b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.kt.txt index 18880d0e373..93bd5b87aa4 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.kt.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.kt.txt @@ -35,14 +35,14 @@ class Cell { } val test1: Int /* by */ - field = TODO("IrConstructorCall") + field = Cell(value = 1) @A(...) get(): Int { return #test1$delegate.getValue(thisRef = null, kProp = ::test1) } var test2: Int /* by */ - field = TODO("IrConstructorCall") + field = Cell(value = 2) @A(...) get(): Int { return #test2$delegate.getValue(thisRef = null, kProp = ::test2) diff --git a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt.txt b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt.txt index ebe8fb1c107..a8d51a25362 100644 --- a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt.txt +++ b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.kt.txt @@ -22,7 +22,7 @@ data class Test { } fun copy(x: T = #x, y: String = #y): Test { - return TODO("IrConstructorCall") + return Test(x = x, y = y) } override fun toString(): String { diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.kt.txt b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.kt.txt index e8c6c6886cc..2ba14cf5ff2 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.kt.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.kt.txt @@ -23,7 +23,7 @@ operator fun String.getValue(receiver: Any?, p: Any): String { } val testO: String /* by */ - field = TODO("IrConstructorCall").provideDelegate(host = null, p = ::testO) + field = MyClass(value = "O").provideDelegate(host = null, p = ::testO) get(): String { return #testO$delegate.getValue(receiver = null, p = ::testO) } diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/local.kt.txt b/compiler/testData/ir/irText/declarations/provideDelegate/local.kt.txt index 1721d1eea00..6e10c0bab61 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/local.kt.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/local.kt.txt @@ -30,7 +30,7 @@ class DelegateProvider { get operator fun provideDelegate(thisRef: Any?, property: Any?): Delegate { - return TODO("IrConstructorCall") + return Delegate(value = .()) } @@ -40,7 +40,7 @@ class DelegateProvider { fun foo() { val testMember: String - val testMember$delegate: Delegate = TODO("IrConstructorCall").provideDelegate(thisRef = null, property = ::testMember) + val testMember$delegate: Delegate = DelegateProvider(value = "OK").provideDelegate(thisRef = null, property = ::testMember) local get(): String { return testMember$delegate.getValue(thisRef = null, property = ::testMember) } diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt.txt b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt.txt index 0fffed7d102..0f8ebc3ca62 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.kt.txt @@ -24,7 +24,7 @@ operator fun String.getValue(receiver: Any?, p: Any): String { fun box(): String { val testO: String - val testO$delegate: String = TODO("IrConstructorCall").provideDelegate(host = null, p = ::testO) + val testO$delegate: String = MyClass(value = "O").provideDelegate(host = null, p = ::testO) local get(): String { return testO$delegate.getValue(receiver = null, p = ::testO) } diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/member.kt.txt b/compiler/testData/ir/irText/declarations/provideDelegate/member.kt.txt index 98919c32093..3d2696aee1d 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/member.kt.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/member.kt.txt @@ -30,7 +30,7 @@ class DelegateProvider { get operator fun provideDelegate(thisRef: Any?, property: Any?): Delegate { - return TODO("IrConstructorCall") + return Delegate(value = .()) } @@ -46,7 +46,7 @@ class Host { } val testMember: String /* by */ - field = TODO("IrConstructorCall").provideDelegate(thisRef = , property = ::testMember) + field = DelegateProvider(value = "OK").provideDelegate(thisRef = , property = ::testMember) get(): String { return #testMember$delegate.getValue(thisRef = , property = ::testMember) } diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.kt.txt b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.kt.txt index ca89f230f9b..4c102029584 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.kt.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.kt.txt @@ -26,7 +26,7 @@ object Host { } operator fun String.provideDelegate(host: Any?, p: Any): StringDelegate { - return TODO("IrConstructorCall") + return StringDelegate(s = ) } val String.plusK: String /* by */ diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.kt.txt b/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.kt.txt index e470542c0da..20d42a51f8a 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.kt.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.kt.txt @@ -30,7 +30,7 @@ class DelegateProvider { get operator fun provideDelegate(thisRef: Any?, property: Any?): Delegate { - return TODO("IrConstructorCall") + return Delegate(value = .()) } @@ -39,7 +39,7 @@ class DelegateProvider { } val testTopLevel: String /* by */ - field = TODO("IrConstructorCall").provideDelegate(thisRef = null, property = ::testTopLevel) + field = DelegateProvider(value = "OK").provideDelegate(thisRef = null, property = ::testTopLevel) get(): String { return #testTopLevel$delegate.getValue(thisRef = null, property = ::testTopLevel) } diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignment2.kt.txt b/compiler/testData/ir/irText/expressions/augmentedAssignment2.kt.txt index 72601051367..0c43289a5a7 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignment2.kt.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignment2.kt.txt @@ -26,11 +26,11 @@ operator fun A.remAssign(s: String) { } val p: A - field = TODO("IrConstructorCall") + field = A() get fun testVariable() { - val a: A = TODO("IrConstructorCall") + val a: A = A() a.plusAssign(s = "+=") a.minusAssign(s = "-=") a.timesAssign(s = "*=") diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.kt.txt b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.kt.txt index 44a19d655a0..1c170efdb74 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.kt.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignmentWithExpression.kt.txt @@ -18,7 +18,7 @@ class Host { } fun foo(): Host { - return TODO("IrConstructorCall") + return Host() } fun Host.test2() { diff --git a/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt b/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt index 7af7d6a25a8..9e07f1a3a99 100644 --- a/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt +++ b/compiler/testData/ir/irText/expressions/breakContinueInWhen.kt.txt @@ -1,5 +1,8 @@ fun testBreakFor() { - val xs: IntArray = TODO("IrConstructorCall") + val xs: IntArray = IntArray(size = 10, init = local fun (i: Int): Int { + return i + } +) var k: Int = 0 { // BLOCK val tmp0_iterator: IntIterator = xs.iterator() @@ -35,7 +38,10 @@ fun testBreakDoWhile() { } fun testContinueFor() { - val xs: IntArray = TODO("IrConstructorCall") + val xs: IntArray = IntArray(size = 10, init = local fun (i: Int): Int { + return i + } +) var k: Int = 0 { // BLOCK val tmp0_iterator: IntIterator = xs.iterator() @@ -76,7 +82,7 @@ fun testContinueDoWhile() { // } while (less(arg0 = k, arg1 = 10)) } when { - EQEQ(arg0 = s, arg1 = "1;2;").not() -> throw TODO("IrConstructorCall") + EQEQ(arg0 = s, arg1 = "1;2;").not() -> throw AssertionError(p0 = s) } } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.kt.txt index d3e0c0d349b..d2cb7bca6f3 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/boundInnerGenericConstructor.kt.txt @@ -37,7 +37,7 @@ inline fun foo(a: A, b: B, x: Function2>) } fun box(): String { - val z: Foo = TODO("IrConstructorCall") + val z: Foo = Foo() val foo: Inner = foo(a = "O", b = "K", x = ::) return foo.().plus(other = foo.()) } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt.txt index 53498fc83f2..be01cbbcdc8 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/constructorWithAdaptedArguments.kt.txt @@ -40,7 +40,7 @@ class Outer { fun testConstructor(): Any { return use(fn = local fun (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.(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.(p0: Int): Inner { - return TODO("IrConstructorCall") + return receiver.Inner(xs = [p0]) } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt.txt index 4acb5f7853b..4c19b2b4a82 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/kt37131.kt.txt @@ -31,7 +31,7 @@ fun testFn(): Any { fun testCtor(): Any { return use(fn = local fun (): C { - return TODO("IrConstructorCall") + return C() } ) } diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.kt.txt index 6c79c42a820..23a8b1814df 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withArgumentAdaptationAndReceiver.kt.txt @@ -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 */ diff --git a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt index 3ec8016a282..be006419800 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/withVarargViewedAsArray.kt.txt @@ -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.(), init = local fun (it: Int): Int { + return args.get(index = it).toInt() + } +)]) } fun zap(vararg b: String, k: Int = 42) { diff --git a/compiler/testData/ir/irText/expressions/classReference.kt.txt b/compiler/testData/ir/irText/expressions/classReference.kt.txt index 8c24a32e11f..34cb3830d0f 100644 --- a/compiler/testData/ir/irText/expressions/classReference.kt.txt +++ b/compiler/testData/ir/irText/expressions/classReference.kt.txt @@ -12,8 +12,8 @@ class A { fun test() { A::class /*~> Unit */ - TODO("IrConstructorCall")::class /*~> Unit */ + A()::class /*~> Unit */ A::class.() /*~> Unit */ - TODO("IrConstructorCall")::class.() /*~> Unit */ + A()::class.() /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.kt.txt b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.kt.txt index 09e220cb5f4..cd52c691590 100644 --- a/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.kt.txt +++ b/compiler/testData/ir/irText/expressions/complexAugmentedAssignment.kt.txt @@ -128,6 +128,6 @@ object Host { } fun Host.test3(v: B) { - (, v).plusAssign(b = TODO("IrConstructorCall")) + (, v).plusAssign(b = B(s = 1000)) } diff --git a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.kt.txt b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.kt.txt index 196d9d50448..6a0928581a0 100644 --- a/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.kt.txt +++ b/compiler/testData/ir/irText/expressions/constructorWithOwnTypeParametersCall.kt.txt @@ -1,9 +1,9 @@ fun testKotlin(): K2 { - return TODO("IrConstructorCall") + return K1().K2() } fun testJava(): J2 { - return TODO("IrConstructorCall") + return J1<@FlexibleNullability Int?, @FlexibleNullability String?>().J2<@FlexibleNullability Double?, @FlexibleNullability CharSequence?>() } class K1 { diff --git a/compiler/testData/ir/irText/expressions/contructorCall.kt.txt b/compiler/testData/ir/irText/expressions/contructorCall.kt.txt index cbc8e47516b..50dcca237b7 100644 --- a/compiler/testData/ir/irText/expressions/contructorCall.kt.txt +++ b/compiler/testData/ir/irText/expressions/contructorCall.kt.txt @@ -11,6 +11,6 @@ class A { } val test: A - field = TODO("IrConstructorCall") + field = A() get diff --git a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.kt.txt b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.kt.txt index 63d9f5759ec..af15c51841f 100644 --- a/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.kt.txt +++ b/compiler/testData/ir/irText/expressions/forWithImplicitReceivers.kt.txt @@ -29,7 +29,7 @@ class IntCell { interface IReceiver { operator fun FiveTimes.iterator(): IntCell { - return TODO("IrConstructorCall") + return IntCell(value = 5) } operator fun IntCell.hasNext(): Boolean { diff --git a/compiler/testData/ir/irText/expressions/funInterface/partialSam.kt.txt b/compiler/testData/ir/irText/expressions/funInterface/partialSam.kt.txt index 9f09ca71bd9..afbecadfe46 100644 --- a/compiler/testData/ir/irText/expressions/funInterface/partialSam.kt.txt +++ b/compiler/testData/ir/irText/expressions/funInterface/partialSam.kt.txt @@ -40,7 +40,7 @@ val fsi: Fn } - TODO("IrConstructorCall") + () } get @@ -63,7 +63,7 @@ val fis: Fn } - TODO("IrConstructorCall") + () } get diff --git a/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt.txt b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt.txt index de733a79f3d..7b8f08c1967 100644 --- a/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt.txt +++ b/compiler/testData/ir/irText/expressions/genericConstructorCallWithTypeArguments.kt.txt @@ -1,9 +1,12 @@ fun testSimple(): Box { - return TODO("IrConstructorCall") + return Box(value = 2L.times(other = 3)) } inline fun testArray(n: Int, crossinline block: Function0): Array { - return TODO("IrConstructorCall") + return Array(size = n, init = local fun (it: Int): T { + return block.invoke() + } +) } class Box { diff --git a/compiler/testData/ir/irText/expressions/genericPropertyRef.kt.txt b/compiler/testData/ir/irText/expressions/genericPropertyRef.kt.txt index 7f609db12b1..3a91b1db879 100644 --- a/compiler/testData/ir/irText/expressions/genericPropertyRef.kt.txt +++ b/compiler/testData/ir/irText/expressions/genericPropertyRef.kt.txt @@ -21,13 +21,13 @@ class Value { } val Value.additionalText: Int /* by */ - field = TODO("IrConstructorCall") + field = DVal(kmember = ::text) get(): Int { return #additionalText$delegate.getValue(t = , p = ::additionalText) } val Value.additionalValue: Int /* by */ - field = TODO("IrConstructorCall") + field = DVal(kmember = ::value) get(): Int { return #additionalValue$delegate.getValue(t = , p = ::additionalValue) } diff --git a/compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.kt.txt b/compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.kt.txt index 4e9fd5ade2a..283ab4d59c4 100644 --- a/compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.kt.txt +++ b/compiler/testData/ir/irText/expressions/jvmFieldWithIntersectionTypes.kt.txt @@ -65,16 +65,16 @@ class DerivedThroughMid2 : Mid, IFoo { } fun test(b: Boolean) { - val d1: Derived1 = TODO("IrConstructorCall") - val d2: Derived2 = TODO("IrConstructorCall") + val d1: Derived1 = Derived1() + val d2: Derived2 = Derived2() val k: Any = when { b -> d1 true -> d2 } #f = 42 #f /*~> Unit */ - val md1: DerivedThroughMid1 = TODO("IrConstructorCall") - val md2: DerivedThroughMid2 = TODO("IrConstructorCall") + val md1: DerivedThroughMid1 = DerivedThroughMid1() + val md2: DerivedThroughMid2 = DerivedThroughMid2() val mk: Any = when { b -> md1 true -> md2 diff --git a/compiler/testData/ir/irText/expressions/kt16904.kt.txt b/compiler/testData/ir/irText/expressions/kt16904.kt.txt index 955aaa204a8..a718472cb3f 100644 --- a/compiler/testData/ir/irText/expressions/kt16904.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt16904.kt.txt @@ -6,7 +6,7 @@ abstract class A { } val x: B - field = TODO("IrConstructorCall") + field = B() get var y: Int diff --git a/compiler/testData/ir/irText/expressions/kt16905.kt.txt b/compiler/testData/ir/irText/expressions/kt16905.kt.txt index 99a9519206c..30a1416661a 100644 --- a/compiler/testData/ir/irText/expressions/kt16905.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt16905.kt.txt @@ -48,6 +48,6 @@ class Outer { typealias OI = Inner fun test(): Inner { - return TODO("IrConstructorCall") + return Outer().Inner() } diff --git a/compiler/testData/ir/irText/expressions/kt30796.kt.txt b/compiler/testData/ir/irText/expressions/kt30796.kt.txt index 12526d1473e..6e9bd7a3268 100644 --- a/compiler/testData/ir/irText/expressions/kt30796.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt30796.kt.txt @@ -1,5 +1,5 @@ fun magic(): T { - throw TODO("IrConstructorCall") + throw Exception() } fun test(value: T, value2: T) { diff --git a/compiler/testData/ir/irText/expressions/kt36956.kt.txt b/compiler/testData/ir/irText/expressions/kt36956.kt.txt index 90da1570330..8b8e5d02e33 100644 --- a/compiler/testData/ir/irText/expressions/kt36956.kt.txt +++ b/compiler/testData/ir/irText/expressions/kt36956.kt.txt @@ -22,7 +22,7 @@ class A { } val aFloat: A - field = TODO("IrConstructorCall") + field = A(value = 0.0F) get val aInt: Float diff --git a/compiler/testData/ir/irText/expressions/memberTypeArguments.kt.txt b/compiler/testData/ir/irText/expressions/memberTypeArguments.kt.txt index 4102378e6ae..15b69e36805 100644 --- a/compiler/testData/ir/irText/expressions/memberTypeArguments.kt.txt +++ b/compiler/testData/ir/irText/expressions/memberTypeArguments.kt.txt @@ -10,7 +10,7 @@ class GenericClass { get fun withNewValue(newValue: T): GenericClass { - return TODO("IrConstructorCall") + return GenericClass(value = newValue) } diff --git a/compiler/testData/ir/irText/expressions/multipleThisReferences.kt.txt b/compiler/testData/ir/irText/expressions/multipleThisReferences.kt.txt index 570c8ea6ce0..504335e0a82 100644 --- a/compiler/testData/ir/irText/expressions/multipleThisReferences.kt.txt +++ b/compiler/testData/ir/irText/expressions/multipleThisReferences.kt.txt @@ -56,7 +56,7 @@ class Host { } - TODO("IrConstructorCall") + () } } diff --git a/compiler/testData/ir/irText/expressions/objectReference.kt.txt b/compiler/testData/ir/irText/expressions/objectReference.kt.txt index 302e727b38a..ed74279f699 100644 --- a/compiler/testData/ir/irText/expressions/objectReference.kt.txt +++ b/compiler/testData/ir/irText/expressions/objectReference.kt.txt @@ -85,7 +85,7 @@ object Z { } - TODO("IrConstructorCall") + () } get diff --git a/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.kt.txt b/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.kt.txt index 226510ea91a..71767b36eba 100644 --- a/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/arrayAsVarargAfterSamArgument.kt.txt @@ -13,12 +13,36 @@ fun test(fn: Function0, r: Runnable, arr: Array) { foo1(r = fn /*-> @FlexibleNullability Runnable? */, strs = arr) /*~> Unit */ foo1(r = fn /*-> @FlexibleNullability Runnable? */, strs = [*arr]) /*~> Unit */ foo1(r = r, strs = [*arr]) /*~> Unit */ - val i1: Test = TODO("IrConstructorCall") - val i2: Test = TODO("IrConstructorCall") - val i3: Test = TODO("IrConstructorCall") - val i4: Test = TODO("IrConstructorCall") - val i5: Test = TODO("IrConstructorCall") - val i6: Test = TODO("IrConstructorCall") + val i1: Test = Test(r = local fun () { + return Unit + } + /*-> @FlexibleNullability Runnable? */, strs = arr) + val i2: Test = Test(r = local fun () { + return Unit + } + /*-> @FlexibleNullability Runnable? */, strs = [*arr]) + val i3: Test = Test(r1 = local fun () { + return Unit + } + /*-> @FlexibleNullability Runnable? */, r2 = local fun () { + return Unit + } + /*-> @FlexibleNullability Runnable? */, strs = arr) + val i4: Test = Test(r1 = r, r2 = local fun () { + return Unit + } + /*-> @FlexibleNullability Runnable? */, strs = [""]) + val i5: Test = Test(r1 = local fun () { + return Unit + } + /*-> @FlexibleNullability Runnable? */, r2 = local fun () { + return Unit + } + /*-> @FlexibleNullability Runnable? */, strs = [*arr]) + val i6: Test = Test(r1 = r, r2 = local fun () { + return Unit + } + /*-> @FlexibleNullability Runnable? */, strs = [*arr]) i1.foo2(r1 = local fun () { return Unit } diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt.txt b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt.txt index a9f824ba338..695c032f2d0 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall.kt.txt @@ -1,9 +1,9 @@ fun test1(f: Function1): C<@FlexibleNullability String?> { - return TODO("IrConstructorCall") + return C<@FlexibleNullability String?>(jxx = f /*-> @FlexibleNullability J<@FlexibleNullability String?, @FlexibleNullability String?>? */) } fun test2(x: Any) { x as Function1 /*~> Unit */ - TODO("IrConstructorCall") /*~> Unit */ + C<@FlexibleNullability String?>(jxx = x /*as Function1<@ParameterName(...) @FlexibleNullability String?, @FlexibleNullability String?> */ /*-> @FlexibleNullability J<@FlexibleNullability String?, @FlexibleNullability String?>? */) /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.kt.txt b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.kt.txt index 4043b3ac501..76b72398f61 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionInGenericConstructorCall_NI.kt.txt @@ -1,5 +1,5 @@ fun test3(f1: Function1, f2: Function1): D<@FlexibleNullability Int?, @FlexibleNullability String?> { - return TODO("IrConstructorCall") + return C<@FlexibleNullability String?>(jxx = f1 /*-> @FlexibleNullability J<@FlexibleNullability String?, @FlexibleNullability String?>? */).D<@FlexibleNullability Int?>(jxy = f2 /*-> @FlexibleNullability J<@FlexibleNullability String?, @FlexibleNullability Int?>? */) } class Outer { @@ -35,15 +35,15 @@ class Outer { } fun test4(f: Function1, g: Function1): Inner<@FlexibleNullability Any?, @FlexibleNullability String?> { - return TODO("IrConstructorCall") + return Outer<@FlexibleNullability String?>(j11 = f /*-> J<@FlexibleNullability String?, @FlexibleNullability String?> */).Inner<@FlexibleNullability Any?>(j12 = g /*-> J<@FlexibleNullability String?, @FlexibleNullability Any?> */) } fun testGenericJavaCtor1(f: Function1): G<@FlexibleNullability String?> { - return TODO("IrConstructorCall") + return G<@FlexibleNullability String?, @FlexibleNullability Int?>(x = f /*-> @FlexibleNullability J<@FlexibleNullability Int?, @FlexibleNullability String?>? */) } fun testGenericJavaCtor2(x: Any) { x as Function1 /*~> Unit */ - TODO("IrConstructorCall") /*~> Unit */ + G<@FlexibleNullability String?, @FlexibleNullability Int?>(x = x /*as Function1<@ParameterName(...) @FlexibleNullability String?, @FlexibleNullability Int?> */ /*-> @FlexibleNullability J<@FlexibleNullability Int?, @FlexibleNullability String?>? */) /*~> Unit */ } diff --git a/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.kt.txt b/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.kt.txt index 8fbbf0f2a7e..396d6a3ad01 100644 --- a/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.kt.txt +++ b/compiler/testData/ir/irText/expressions/sam/samConversionsWithSmartCasts.kt.txt @@ -9,7 +9,7 @@ fun test1(a: Function0) { fun test2(a: Function0) { when { a is Runnable -> { // BLOCK - TODO("IrConstructorCall").run1(r = a /*as Runnable */) + J().run1(r = a /*as Runnable */) } } } @@ -17,7 +17,7 @@ fun test2(a: Function0) { fun test3(a: Function0) { when { a is Runnable -> { // BLOCK - TODO("IrConstructorCall").run2(r1 = a /*as Runnable */, r2 = a /*as Runnable */) + J().run2(r1 = a /*as Runnable */, r2 = a /*as Runnable */) } } } @@ -25,7 +25,7 @@ fun test3(a: Function0) { fun test4(a: Function0, b: Function0) { when { a is Runnable -> { // BLOCK - TODO("IrConstructorCall").run2(r1 = a /*-> @FlexibleNullability Runnable? */, r2 = b /*-> @FlexibleNullability Runnable? */) + J().run2(r1 = a /*-> @FlexibleNullability Runnable? */, r2 = b /*-> @FlexibleNullability Runnable? */) } } } @@ -33,7 +33,7 @@ fun test4(a: Function0, b: Function0) { fun test5(a: Any) { when { a is Runnable -> { // BLOCK - TODO("IrConstructorCall").run1(r = a /*as Runnable */) + J().run1(r = a /*as Runnable */) } } } @@ -42,26 +42,26 @@ fun test5x(a: Any) { when { a is Runnable -> { // BLOCK a as Function0 /*~> Unit */ - TODO("IrConstructorCall").run1(r = a /*as Runnable */) + J().run1(r = a /*as Runnable */) } } } fun test6(a: Any) { a as Function0 /*~> Unit */ - TODO("IrConstructorCall").run1(r = a /*as Function0 */ /*-> @FlexibleNullability Runnable? */) + J().run1(r = a /*as Function0 */ /*-> @FlexibleNullability Runnable? */) } fun test7(a: Function1) { a as Function0 /*~> Unit */ - TODO("IrConstructorCall").run1(r = a /*as Function0 */ /*-> @FlexibleNullability Runnable? */) + J().run1(r = a /*as Function0 */ /*-> @FlexibleNullability Runnable? */) } fun test8(a: Function0) { - TODO("IrConstructorCall").run1(r = id<@FlexibleNullability Function0?>(x = a) /*!! Function0 */ /*-> @FlexibleNullability Runnable? */) + J().run1(r = id<@FlexibleNullability Function0?>(x = a) /*!! Function0 */ /*-> @FlexibleNullability Runnable? */) } fun test9() { - TODO("IrConstructorCall").run1(r = ::test9 /*-> @FlexibleNullability Runnable? */) + J().run1(r = ::test9 /*-> @FlexibleNullability Runnable? */) } diff --git a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.kt.txt b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.kt.txt index 21bb6a5cf5e..03d6718bd5e 100644 --- a/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.kt.txt +++ b/compiler/testData/ir/irText/expressions/specializedTypeAliasConstructorCall.kt.txt @@ -16,6 +16,6 @@ class Cell { typealias IntAlias = Cell fun test(): Cell { - return TODO("IrConstructorCall") + return Cell(value = 42) } diff --git a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt.txt b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt.txt index 8da74d6a5a8..899e289caa3 100644 --- a/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt.txt +++ b/compiler/testData/ir/irText/expressions/thisOfGenericOuterClass.kt.txt @@ -49,7 +49,7 @@ fun Outer.test(): Inner { } - TODO("IrConstructorCall") + () } } diff --git a/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt.txt b/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt.txt index fb28868a546..2035f6a97aa 100644 --- a/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt.txt +++ b/compiler/testData/ir/irText/expressions/thisReferenceBeforeClassDeclared.kt.txt @@ -13,7 +13,7 @@ fun WithCompanion.test() { } - TODO("IrConstructorCall") + () } val test2: = { // BLOCK local class : WithCompanion { @@ -29,7 +29,7 @@ fun WithCompanion.test() { } - TODO("IrConstructorCall") + () } } diff --git a/compiler/testData/ir/irText/expressions/throw.kt.txt b/compiler/testData/ir/irText/expressions/throw.kt.txt index fdd10538152..e80fdc7a1f5 100644 --- a/compiler/testData/ir/irText/expressions/throw.kt.txt +++ b/compiler/testData/ir/irText/expressions/throw.kt.txt @@ -1,5 +1,5 @@ fun test1() { - throw TODO("IrConstructorCall") + throw Throwable() } fun testImplicitCast(a: Any) { diff --git a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt.txt b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt.txt index 3964e87a4cd..bd1b4d57924 100644 --- a/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt.txt +++ b/compiler/testData/ir/irText/firProblems/ClashResolutionDescriptor.kt.txt @@ -69,7 +69,7 @@ fun resolveClashesIfAny(container: ComponentContainer, clashResolvers: List tmp1_elvis_lhs } } - val substituteDescriptor: ClashResolutionDescriptor>>>>> = TODO("IrConstructorCall") + val substituteDescriptor: ClashResolutionDescriptor>>>>> = ClashResolutionDescriptor>>>>>(container = container, resolver = resolver, clashedComponents = clashedComponents.toList()) } } } diff --git a/compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt.txt b/compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt.txt index 2e326ce32da..9cda3191fef 100644 --- a/compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt.txt +++ b/compiler/testData/ir/irText/firProblems/InnerClassInAnonymous.kt.txt @@ -12,7 +12,7 @@ fun box(): String { get fun foo(): String { - return TODO("IrConstructorCall").bar() + return .Some(s = "O").bar() } local inner class Some : Base { @@ -53,7 +53,7 @@ fun box(): String { } - TODO("IrConstructorCall") + () } return obj.foo() } diff --git a/compiler/testData/ir/irText/firProblems/MultiList.kt.txt b/compiler/testData/ir/irText/firProblems/MultiList.kt.txt index d3f9d6e0079..32ce6da9caf 100644 --- a/compiler/testData/ir/irText/firProblems/MultiList.kt.txt +++ b/compiler/testData/ir/irText/firProblems/MultiList.kt.txt @@ -14,7 +14,7 @@ data class Some { } fun copy(value: T = #value): Some { - return TODO("IrConstructorCall") + return Some(value = value) } override fun toString(): String { diff --git a/compiler/testData/ir/irText/firProblems/SignatureClash.kt.txt b/compiler/testData/ir/irText/firProblems/SignatureClash.kt.txt index a5ba4f95802..824d78dbb52 100644 --- a/compiler/testData/ir/irText/firProblems/SignatureClash.kt.txt +++ b/compiler/testData/ir/irText/firProblems/SignatureClash.kt.txt @@ -59,7 +59,7 @@ data class DataClass : Derived, Delegate { } fun copy(delegate: Delegate = #delegate): DataClass { - return TODO("IrConstructorCall") + return DataClass(delegate = delegate) } override fun toString(): String { diff --git a/compiler/testData/ir/irText/firProblems/v8arrayToList.kt.txt b/compiler/testData/ir/irText/firProblems/v8arrayToList.kt.txt index cc6c848bb8d..922223e6148 100644 --- a/compiler/testData/ir/irText/firProblems/v8arrayToList.kt.txt +++ b/compiler/testData/ir/irText/firProblems/v8arrayToList.kt.txt @@ -11,7 +11,7 @@ class V8Array { } fun box(): String { - val array: V8Array = TODO("IrConstructorCall") + val array: V8Array = V8Array() val list: List = toList(array = array) as List return list.get(index = 0) } diff --git a/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt b/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt index eb461e9e0e7..18a78f1ae74 100644 --- a/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt +++ b/compiler/testData/ir/irText/lambdas/destructuringInLambda.kt.txt @@ -22,7 +22,7 @@ data class A { } fun copy(x: Int = #x, y: Int = #y): A { - return TODO("IrConstructorCall") + return A(x = x, y = y) } override fun toString(): String { diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.kt.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.kt.txt index fab7b050566..eeb31095210 100644 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.kt.txt +++ b/compiler/testData/ir/irText/regressions/coercionInLoop.kt.txt @@ -1,5 +1,5 @@ fun box(): String { - val a: DoubleArray = TODO("IrConstructorCall") + val a: DoubleArray = DoubleArray(size = 5) val x: DoubleIterator = a.iterator() var i: Int = 0 while (x.hasNext()) { // BLOCK diff --git a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.kt.txt b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.kt.txt index 024fd5d302a..0ef13c0c97c 100644 --- a/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.kt.txt +++ b/compiler/testData/ir/irText/regressions/typeAliasCtorForGenericClass.kt.txt @@ -17,7 +17,7 @@ class A { typealias B = A typealias B2 = A> fun bar() { - val b: A = TODO("IrConstructorCall") - val b2: A> = TODO("IrConstructorCall") + val b: A = A(q = 2) + val b2: A> = A>(q = b) } diff --git a/compiler/testData/ir/irText/stubs/builtinMap.kt.txt b/compiler/testData/ir/irText/stubs/builtinMap.kt.txt index 8a53451e0b3..8cef277aeac 100644 --- a/compiler/testData/ir/irText/stubs/builtinMap.kt.txt +++ b/compiler/testData/ir/irText/stubs/builtinMap.kt.txt @@ -1,7 +1,7 @@ fun Map.plus(pair: Pair): Map { return when { .isEmpty() -> mapOf(pair = pair) - true -> TODO("IrConstructorCall").apply>(block = local fun LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>.() { + true -> LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>(p0 = ).apply>(block = local fun LinkedHashMap<@FlexibleNullability K1?, @FlexibleNullability V1?>.() { .put(key = pair.(), value = pair.()) /*~> Unit */ } ) diff --git a/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.kt.txt b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.kt.txt index 9e547cac5c6..f0707ec2280 100644 --- a/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.kt.txt +++ b/compiler/testData/ir/irText/stubs/javaConstructorWithTypeParameters.kt.txt @@ -1,16 +1,16 @@ fun test1(): J1 { - return TODO("IrConstructorCall") + return J1<@FlexibleNullability Int?>() } fun test2(): J1 { - return TODO("IrConstructorCall") + return J1<@FlexibleNullability Int?, @FlexibleNullability Int?>(x1 = 1) } fun test3(j1: J1): J2 { - return TODO("IrConstructorCall") + return j1.J2<@FlexibleNullability Int?>() } fun test4(j1: J1): J2 { - return TODO("IrConstructorCall") + return j1.J2<@FlexibleNullability Int?, @FlexibleNullability Int?>(x2 = 1) } diff --git a/compiler/testData/ir/irText/stubs/javaInnerClass.kt.txt b/compiler/testData/ir/irText/stubs/javaInnerClass.kt.txt index c516dc6d2c3..4e94cf73896 100644 --- a/compiler/testData/ir/irText/stubs/javaInnerClass.kt.txt +++ b/compiler/testData/ir/irText/stubs/javaInnerClass.kt.txt @@ -6,7 +6,7 @@ class Test1 : J { } val test: JInner - field = TODO("IrConstructorCall") + field = .JInner() get diff --git a/compiler/testData/ir/irText/stubs/javaSyntheticProperty.kt.txt b/compiler/testData/ir/irText/stubs/javaSyntheticProperty.kt.txt index fd847fac41e..695d8b841e8 100644 --- a/compiler/testData/ir/irText/stubs/javaSyntheticProperty.kt.txt +++ b/compiler/testData/ir/irText/stubs/javaSyntheticProperty.kt.txt @@ -1,4 +1,4 @@ val test: @FlexibleNullability String? - field = TODO("IrConstructorCall").getFoo() + field = J().getFoo() get diff --git a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt index c7a1a14e73d..3db7e18aa7d 100644 --- a/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt +++ b/compiler/testData/ir/irText/types/castsInsideCoroutineInference.kt.txt @@ -12,7 +12,7 @@ fun scopedFlow(block: @ExtensionFunctionType SuspendFunction2 Flow.onCompletion(action: @ExtensionFunctionType SuspendFunction2, @ParameterName(...) Throwable?, Unit>): Flow { return unsafeFlow(block = local suspend fun FlowCollector.() { - val safeCollector: SafeCollector = TODO("IrConstructorCall") + val safeCollector: SafeCollector = SafeCollector(collector = ) safeCollector.invokeSafely(action = action) } ) @@ -41,7 +41,7 @@ private fun CoroutineScope.asFairChannel(flow: Flow<*>): ReceiveChannel { return channel.sendFair(element = { // BLOCK val tmp0_elvis_lhs: Any? = value when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> TODO("IrConstructorCall") + EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> Any() true -> tmp0_elvis_lhs } }) @@ -57,7 +57,7 @@ private fun CoroutineScope.asChannel(flow: Flow<*>): ReceiveChannel { return .().send(e = { // BLOCK val tmp0_elvis_lhs: Any? = value when { - EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> TODO("IrConstructorCall") + EQEQ(arg0 = tmp0_elvis_lhs, arg1 = null) -> Any() true -> tmp0_elvis_lhs } }) diff --git a/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.kt.txt b/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.kt.txt index b8676199a9c..d97dd0b3864 100644 --- a/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.kt.txt +++ b/compiler/testData/ir/irText/types/genericDelegatedDeepProperty.kt.txt @@ -124,7 +124,7 @@ val Value>.additionalText: P /* by */ } - TODO("IrConstructorCall") + () } private get(): Any? { return #deepO$delegate.getValue(t = , p = ::deepO) /*as Any? */ @@ -149,14 +149,14 @@ val Value>.additionalText: P /* by */ } - TODO("IrConstructorCall") + () } private get(): Any? { return #deepK$delegate.getValue(t = , p = ::deepK) /*as Any? */ } override operator fun getValue(t: Value>, p: KProperty<*>): P { - return TODO("IrConstructorCall") + return P(p1 = (, t).() /*as Any? */, p2 = (, t).() /*as Any? */) } @@ -165,7 +165,7 @@ val Value>.additionalText: P /* by */ } - TODO("IrConstructorCall") + () } get(): P { return #additionalText$delegate.getValue(t = , p = ::additionalText) diff --git a/compiler/testData/ir/irText/types/intersectionType1_NI.kt.txt b/compiler/testData/ir/irText/types/intersectionType1_NI.kt.txt index eb8c9479b9d..af41877bf00 100644 --- a/compiler/testData/ir/irText/types/intersectionType1_NI.kt.txt +++ b/compiler/testData/ir/irText/types/intersectionType1_NI.kt.txt @@ -23,8 +23,8 @@ inline fun In.ofType(y: Any?): Boolean { } fun test() { - val a1: Array> = arrayOf>(elements = [TODO("IrConstructorCall")]) - val a2: Array> = arrayOf>(elements = [TODO("IrConstructorCall")]) + val a1: Array> = arrayOf>(elements = [In()]) + val a2: Array> = arrayOf>(elements = [In()]) foo(a = a1, b = a2) /*~> Unit */ } diff --git a/compiler/testData/ir/irText/types/intersectionType1_OI.kt.txt b/compiler/testData/ir/irText/types/intersectionType1_OI.kt.txt index 231741a25c6..fc1ecd782b3 100644 --- a/compiler/testData/ir/irText/types/intersectionType1_OI.kt.txt +++ b/compiler/testData/ir/irText/types/intersectionType1_OI.kt.txt @@ -23,8 +23,8 @@ inline fun In.ofType(y: Any?): Boolean { } fun test() { - val a1: Array> = arrayOf>(elements = [TODO("IrConstructorCall")]) - val a2: Array> = arrayOf>(elements = [TODO("IrConstructorCall")]) + val a1: Array> = arrayOf>(elements = [In()]) + val a2: Array> = arrayOf>(elements = [In()]) foo(a = a1, b = a2) /*~> Unit */ } diff --git a/compiler/testData/ir/irText/types/intersectionType2_NI.kt.txt b/compiler/testData/ir/irText/types/intersectionType2_NI.kt.txt index 36ffdc3287b..1319b782b2b 100644 --- a/compiler/testData/ir/irText/types/intersectionType2_NI.kt.txt +++ b/compiler/testData/ir/irText/types/intersectionType2_NI.kt.txt @@ -40,8 +40,8 @@ fun run(fn: Function0): T { fun foo(): Any { return run(fn = local fun (): Any { - val mm: B = TODO("IrConstructorCall") - val nn: C = TODO("IrConstructorCall") + val mm: B = B() + val nn: C = C() val c: Any = when { true -> mm true -> nn diff --git a/compiler/testData/ir/irText/types/intersectionType2_OI.kt.txt b/compiler/testData/ir/irText/types/intersectionType2_OI.kt.txt index 36ffdc3287b..1319b782b2b 100644 --- a/compiler/testData/ir/irText/types/intersectionType2_OI.kt.txt +++ b/compiler/testData/ir/irText/types/intersectionType2_OI.kt.txt @@ -40,8 +40,8 @@ fun run(fn: Function0): T { fun foo(): Any { return run(fn = local fun (): Any { - val mm: B = TODO("IrConstructorCall") - val nn: C = TODO("IrConstructorCall") + val mm: B = B() + val nn: C = C() val c: Any = when { true -> mm true -> nn diff --git a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.kt.txt b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.kt.txt index 26b9674931d..ac107a86453 100644 --- a/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.kt.txt +++ b/compiler/testData/ir/irText/types/nullChecks/enhancedNullabilityInForLoop.kt.txt @@ -100,7 +100,7 @@ data class P { } fun copy(x: Int = #x, y: Int = #y): P { - return TODO("IrConstructorCall") + return P(x = x, y = y) } override fun toString(): String {