From bd1491ac8a3cef49794507034d4596529403f9e2 Mon Sep 17 00:00:00 2001 From: Dmitry Petrov Date: Tue, 6 Nov 2018 18:00:35 +0300 Subject: [PATCH] psi2ir: Merge constant entries in string template expressions This is required to handle UCNs properly, see KT-28006. #KT-28006 --- .../psi2ir/generators/StatementGenerator.kt | 64 ++++++++++++--- .../kotlin/ir/util/RenderIrElement.kt | 10 ++- .../testData/ir/irCfg/when/whenReturn.txt | 20 ++--- .../ir/irText/classes/classMembers.txt | 8 +- .../classes/dataClassWithArrayMembers.txt | 50 ++++++------ .../ir/irText/classes/dataClasses.txt | 38 ++++----- .../ir/irText/classes/dataClassesGeneric.txt | 24 +++--- .../classes/delegatedImplementation.txt | 2 +- ...gConstructorCallToTypeAliasConstructor.txt | 4 +- compiler/testData/ir/irText/classes/enum.txt | 2 +- .../irText/classes/enumWithSecondaryCtor.txt | 4 +- .../testData/ir/irText/classes/initBlock.txt | 8 +- .../ir/irText/classes/inlineClass.txt | 6 +- .../lambdaInDataClassDefaultParameter.txt | 12 +-- .../classes/objectLiteralExpressions.txt | 6 +- .../testData/ir/irText/classes/superCalls.txt | 2 +- .../annotationsWithDefaultParameterValues.txt | 8 +- .../annotationsWithVarargParameters.txt | 6 +- .../arrayInAnnotationArguments.txt | 24 +++--- .../annotations/classesWithAnnotations.txt | 12 +-- ...egatedPropertyAccessorsWithAnnotations.txt | 8 +- .../enumEntriesWithAnnotations.txt | 6 +- .../annotations/fieldsWithAnnotations.txt | 8 +- .../annotations/fileAnnotations.txt | 2 +- .../annotations/javaAnnotation.txt | 4 +- ...ocalDelegatedPropertiesWithAnnotations.txt | 2 +- .../annotations/propertiesWithAnnotations.txt | 4 +- ...ccessorsFromClassHeaderWithAnnotations.txt | 6 +- .../propertyAccessorsWithAnnotations.txt | 20 ++--- .../receiverParameterWithAnnotations.txt | 9 +-- .../spreadOperatorInAnnotationArguments.txt | 4 +- .../typeAliasesWithAnnotations.txt | 2 +- .../valueParametersWithAnnotations.txt | 4 +- .../varargsInAnnotationArguments.txt | 18 ++--- .../annotations/variablesWithAnnotations.txt | 9 +-- .../declarations/constValInitializers.txt | 8 +- .../irText/declarations/defaultArguments.txt | 2 +- .../declarations/fileWithAnnotations.txt | 2 +- .../declarations/parameters/constructor.txt | 2 +- .../parameters/dataClassMembers.txt | 12 +-- .../ir/irText/declarations/parameters/fun.txt | 2 +- .../declarations/parameters/localFun.txt | 2 +- .../provideDelegate/differentReceivers.txt | 4 +- .../declarations/provideDelegate/local.txt | 2 +- .../localDifferentReceivers.txt | 4 +- .../declarations/provideDelegate/member.txt | 2 +- .../provideDelegate/memberExtension.txt | 4 +- .../declarations/provideDelegate/topLevel.txt | 2 +- .../ir/irText/declarations/typeAlias.txt | 4 +- .../expressions/arrayAugmentedAssignment2.txt | 2 +- .../expressions/augmentedAssignment2.txt | 21 +++-- .../testData/ir/irText/expressions/boxOk.txt | 3 +- .../callableReferenceToImportedFromObject.txt | 4 +- .../ir/irText/expressions/coercionToUnit.txt | 7 +- .../testData/ir/irText/expressions/elvis.txt | 5 +- .../expressions/enumEntryAsReceiver.txt | 2 +- .../irText/expressions/extFunSafeInvoke.txt | 3 +- .../extensionPropertyGetterCall.txt | 2 +- .../expressions/funImportedFromObject.txt | 2 +- .../expressions/genericPropertyCall.txt | 2 +- .../implicitCastOnPlatformType.txt | 3 +- .../expressions/jvmStaticFieldReference.txt | 10 +-- .../testData/ir/irText/expressions/kt28006.kt | 13 ++++ .../ir/irText/expressions/kt28006.txt | 77 +++++++++++++++++++ .../ir/irText/expressions/literals.txt | 4 +- .../objectReferenceInFieldInitializer.txt | 4 +- .../ir/irText/expressions/references.txt | 8 +- .../ir/irText/expressions/smartCasts.txt | 4 +- .../smartCastsWithDestructuring.txt | 2 +- .../ir/irText/expressions/stringPlus.txt | 4 +- .../ir/irText/expressions/stringTemplates.txt | 20 ++--- .../expressions/tryCatchWithImplicitCast.txt | 3 +- .../irText/expressions/useImportedMember.txt | 43 +++++------ .../testData/ir/irText/expressions/vararg.txt | 10 +-- .../expressions/variableAsFunctionCall.txt | 4 +- .../testData/ir/irText/expressions/when.txt | 33 ++++---- .../ir/irText/expressions/whenReturn.txt | 21 +++-- .../irText/lambdas/destructuringInLambda.txt | 10 +-- .../ir/irText/lambdas/extensionLambda.txt | 2 +- .../testData/ir/irText/lambdas/samAdapter.txt | 2 +- .../ir/irText/regressions/coercionInLoop.txt | 5 +- .../newInference/fixationOrder1.txt | 5 +- .../synthesizedDataClassMembers.txt | 14 ++-- .../kotlin/ir/IrTextTestCaseGenerated.java | 5 ++ 84 files changed, 476 insertions(+), 351 deletions(-) create mode 100644 compiler/testData/ir/irText/expressions/kt28006.kt create mode 100644 compiler/testData/ir/irText/expressions/kt28006.txt diff --git a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/StatementGenerator.kt b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/StatementGenerator.kt index 1cc5739fdac..5e3e14e830f 100644 --- a/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/StatementGenerator.kt +++ b/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/StatementGenerator.kt @@ -218,7 +218,7 @@ class StatementGenerator( generateConstantExpression( expression, ConstantExpressionEvaluator.getConstant(expression, context.bindingContext) - ?: error("KtConstantExpression was not evaluated: ${expression.text}") + ?: error("KtConstantExpression was not evaluated: ${expression.text}") ) fun generateConstantExpression(expression: KtExpression, constant: CompileTimeConstant<*>): IrExpression = @@ -229,23 +229,60 @@ class StatementGenerator( ) override fun visitStringTemplateExpression(expression: KtStringTemplateExpression, data: Nothing?): IrStatement { - val entries = expression.entries + val startOffset = expression.startOffsetSkippingComments + val endOffset = expression.endOffset + val resultType = getInferredTypeWithImplicitCastsOrFail(expression).toIrType() + val entries = expression.entries.map { it.genExpr() }.postprocessStringTemplateEntries() + return when (entries.size) { + 0 -> IrConstImpl.string(startOffset, endOffset, resultType, "") + 1 -> { - val irArg = entries[0].genExpr() - if (irArg is IrConst<*> && irArg.kind == IrConstKind.String) - irArg + val first = entries.first() + if (first is IrConst<*> && first.kind == IrConstKind.String) + first else - IrStringConcatenationImpl(expression.startOffsetSkippingComments, expression.endOffset, resultType, listOf(irArg)) + IrStringConcatenationImpl(startOffset, endOffset, resultType, listOf(first)) } - 0 -> - IrConstImpl.string(expression.startOffsetSkippingComments, expression.endOffset, resultType, "") - else -> - IrStringConcatenationImpl(expression.startOffsetSkippingComments, expression.endOffset, resultType, entries.map { it.genExpr() }) + + else -> IrStringConcatenationImpl(startOffset, endOffset, resultType, entries) } } + private fun List.postprocessStringTemplateEntries(): List = + ArrayList(this.size).also { result -> + val stringType = context.irBuiltIns.stringType + + val constString = StringBuilder() + var constStringStartOffset = 0 + var constStringEndOffset = 0 + + for (entry in this) { + if (entry is IrConst<*> && entry.kind == IrConstKind.String) { + if (constString.isEmpty()) { + constStringStartOffset = entry.startOffset + } + constString.append(IrConstKind.String.valueOf(entry)) + constStringEndOffset = entry.endOffset + } else { + if (constString.isNotEmpty()) { + result.add( + IrConstImpl.string(constStringStartOffset, constStringEndOffset, stringType, constString.toString()) + ) + constString.clear() + } + result.add(entry) + } + } + + if (constString.isNotEmpty()) { + result.add( + IrConstImpl.string(constStringStartOffset, constStringEndOffset, stringType, constString.toString()) + ) + } + } + override fun visitLiteralStringTemplateEntry(entry: KtLiteralStringTemplateEntry, data: Nothing?): IrStatement = IrConstImpl.string(entry.startOffsetSkippingComments, entry.endOffset, context.irBuiltIns.stringType, entry.text) @@ -304,7 +341,12 @@ class StatementGenerator( else null - return CallGenerator(this).generateCall(expression.startOffsetSkippingComments, expression.endOffset, pregenerateCall(resolvedCall), origin) + return CallGenerator(this).generateCall( + expression.startOffsetSkippingComments, + expression.endOffset, + pregenerateCall(resolvedCall), + origin + ) } override fun visitArrayAccessExpression(expression: KtArrayAccessExpression, data: Nothing?): IrStatement { diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt index db2e347c87a..5b8d2c88540 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/util/RenderIrElement.kt @@ -16,6 +16,7 @@ package org.jetbrains.kotlin.ir.util +import com.intellij.openapi.util.text.StringUtil import org.jetbrains.kotlin.descriptors.DeclarationDescriptor import org.jetbrains.kotlin.descriptors.ReceiverParameterDescriptor import org.jetbrains.kotlin.ir.IrElement @@ -210,7 +211,14 @@ class RenderIrElementVisitor : IrElementVisitor { "? ${expression::class.java.simpleName} type=${expression.type.render()}" override fun visitConst(expression: IrConst, data: Nothing?): String = - "CONST ${expression.kind} type=${expression.type.render()} value=${expression.value}" + "CONST ${expression.kind} type=${expression.type.render()} value=${expression.value?.escapeIfRequired()}" + + private fun Any.escapeIfRequired() = + when (this) { + is String -> "\"${StringUtil.escapeStringCharacters(this)}\"" + is Char -> "'${StringUtil.escapeStringCharacters(this.toString())}'" + else -> this + } override fun visitVararg(expression: IrVararg, data: Nothing?): String = "VARARG type=${expression.type.render()} varargElementType=${expression.varargElementType.render()}" diff --git a/compiler/testData/ir/irCfg/when/whenReturn.txt b/compiler/testData/ir/irCfg/when/whenReturn.txt index c0c0a9ba8e8..45be72574b3 100644 --- a/compiler/testData/ir/irCfg/when/whenReturn.txt +++ b/compiler/testData/ir/irCfg/when/whenReturn.txt @@ -7,7 +7,7 @@ CONTENT 3 VAR IR_TEMPORARY_VARIABLE name:tmp0_subject type:kotlin.String flags:val 4 WHEN type=kotlin.Nothing origin=WHEN 5 GET_VAR 'tmp0_subject: String' type=kotlin.String origin=null - 6 CONST String type=kotlin.String value=A + 6 CONST String type=kotlin.String value="A" OUTGOING -> BB 1, 5 CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ BB 1 @@ -15,7 +15,7 @@ INCOMING <- BB 0 CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ CONTENT 1 GET_VAR 'tmp0_subject: String' type=kotlin.String origin=null - 2 CONST String type=kotlin.String value=B + 2 CONST String type=kotlin.String value="B" OUTGOING -> BB 2, 6 CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ BB 2 @@ -23,7 +23,7 @@ INCOMING <- BB 1 CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ CONTENT 1 GET_VAR 'tmp0_subject: String' type=kotlin.String origin=null - 2 CONST String type=kotlin.String value=C + 2 CONST String type=kotlin.String value="C" OUTGOING -> BB 3, 7 CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ BB 3 @@ -31,7 +31,7 @@ INCOMING <- BB 2 CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ CONTENT 1 GET_VAR 'tmp0_subject: String' type=kotlin.String origin=null - 2 CONST String type=kotlin.String value=D + 2 CONST String type=kotlin.String value="D" OUTGOING -> BB 4, 8 CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ BB 4 @@ -44,7 +44,7 @@ BB 5 INCOMING <- BB 0 CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ CONTENT - 1 CONST String type=kotlin.String value=Excellent + 1 CONST String type=kotlin.String value="Excellent" 2 RETURN type=kotlin.Nothing from='toString(String): String' OUTGOING -> NONE Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String flags: @@ -52,7 +52,7 @@ BB 6 INCOMING <- BB 1 CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ CONTENT - 1 CONST String type=kotlin.String value=Good + 1 CONST String type=kotlin.String value="Good" 2 RETURN type=kotlin.Nothing from='toString(String): String' OUTGOING -> NONE Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String flags: @@ -60,7 +60,7 @@ BB 7 INCOMING <- BB 2 CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ CONTENT - 1 CONST String type=kotlin.String value=Mediocre + 1 CONST String type=kotlin.String value="Mediocre" 2 RETURN type=kotlin.Nothing from='toString(String): String' OUTGOING -> NONE Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String flags: @@ -68,7 +68,7 @@ BB 8 INCOMING <- BB 3 CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ CONTENT - 1 CONST String type=kotlin.String value=Fair + 1 CONST String type=kotlin.String value="Fair" 2 RETURN type=kotlin.Nothing from='toString(String): String' OUTGOING -> NONE Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String flags: @@ -76,7 +76,7 @@ BB 9 INCOMING <- BB 4 CONST Boolean type=kotlin.Boolean value=true CONTENT - 1 CONST String type=kotlin.String value=Failure + 1 CONST String type=kotlin.String value="Failure" 2 RETURN type=kotlin.Nothing from='toString(String): String' OUTGOING -> NONE Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String flags: @@ -84,7 +84,7 @@ BB 10 INCOMING <- BB 4 CONST Boolean type=kotlin.Boolean value=true CONTENT - 1 CONST String type=kotlin.String value=??? + 1 CONST String type=kotlin.String value="???" 2 RETURN type=kotlin.Nothing from='toString(String): String' OUTGOING -> NONE Function exit: FUN name:toString visibility:public modality:FINAL <> (grade:kotlin.String) returnType:kotlin.String flags: diff --git a/compiler/testData/ir/irText/classes/classMembers.txt b/compiler/testData/ir/irText/classes/classMembers.txt index a09dd0d94ef..f4d256e3f3e 100644 --- a/compiler/testData/ir/irText/classes/classMembers.txt +++ b/compiler/testData/ir/irText/classes/classMembers.txt @@ -84,13 +84,13 @@ FILE fqName: fileName:/classMembers.kt $this: VALUE_PARAMETER name: type:C flags: BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=1 + message: CONST String type=kotlin.String value="1" FUN name:memberExtensionFunction visibility:public modality:FINAL <> ($this:C, $receiver:kotlin.Int) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:C flags: $receiver: VALUE_PARAMETER name: type:kotlin.Int flags: BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=2 + message: CONST String type=kotlin.String value="2" CLASS CLASS name:NestedClass modality:FINAL visibility:public flags: superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:C.NestedClass flags: CONSTRUCTOR visibility:public <> () returnType:C.NestedClass flags:primary @@ -101,13 +101,13 @@ FILE fqName: fileName:/classMembers.kt $this: VALUE_PARAMETER name: type:C.NestedClass flags: BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=3 + message: CONST String type=kotlin.String value="3" FUN name:memberExtensionFunction visibility:public modality:FINAL <> ($this:C.NestedClass, $receiver:kotlin.Int) returnType:kotlin.Unit flags: $this: VALUE_PARAMETER name: type:C.NestedClass flags: $receiver: VALUE_PARAMETER name: type:kotlin.Int flags: BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=4 + message: CONST String type=kotlin.String value="4" FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: diff --git a/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.txt b/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.txt index 462af0ba0a7..0492d00690a 100644 --- a/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.txt +++ b/compiler/testData/ir/irText/classes/dataClassWithArrayMembers.txt @@ -224,52 +224,52 @@ FILE fqName: fileName:/dataClassWithArrayMembers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=Test1( - CONST String type=kotlin.String value=stringArray= + CONST String type=kotlin.String value="Test1(" + CONST String type=kotlin.String value="stringArray=" CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null arg0: CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=charArray= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="charArray=" CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null arg0: CALL '(): CharArray' type=kotlin.CharArray origin=GET_PROPERTY $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=booleanArray= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="booleanArray=" CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null arg0: CALL '(): BooleanArray' type=kotlin.BooleanArray origin=GET_PROPERTY $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=byteArray= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="byteArray=" CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null arg0: CALL '(): ByteArray' type=kotlin.ByteArray origin=GET_PROPERTY $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=shortArray= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="shortArray=" CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null arg0: CALL '(): ShortArray' type=kotlin.ShortArray origin=GET_PROPERTY $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=intArray= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="intArray=" CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null arg0: CALL '(): IntArray' type=kotlin.IntArray origin=GET_PROPERTY $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=longArray= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="longArray=" CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null arg0: CALL '(): LongArray' type=kotlin.LongArray origin=GET_PROPERTY $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=floatArray= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="floatArray=" CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null arg0: CALL '(): FloatArray' type=kotlin.FloatArray origin=GET_PROPERTY $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=doubleArray= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="doubleArray=" CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null arg0: CALL '(): DoubleArray' type=kotlin.DoubleArray origin=GET_PROPERTY $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test1) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: @@ -506,12 +506,12 @@ FILE fqName: fileName:/dataClassWithArrayMembers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=Test2( - CONST String type=kotlin.String value=genericArray= + CONST String type=kotlin.String value="Test2(" + CONST String type=kotlin.String value="genericArray=" CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null arg0: CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY $this: GET_VAR 'this@Test2: Test2' type=Test2 origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test2) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: @@ -602,12 +602,12 @@ FILE fqName: fileName:/dataClassWithArrayMembers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=Test3( - CONST String type=kotlin.String value=anyArrayN= + CONST String type=kotlin.String value="Test3(" + CONST String type=kotlin.String value="anyArrayN=" CALL 'dataClassArrayMemberToString(Any?): String' type=kotlin.String origin=null arg0: CALL '(): Array?' type=kotlin.Array? origin=GET_PROPERTY $this: GET_VAR 'this@Test3: Test3' type=Test3 origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test3) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: diff --git a/compiler/testData/ir/irText/classes/dataClasses.txt b/compiler/testData/ir/irText/classes/dataClasses.txt index f54094ae5c3..3909b4fe2db 100644 --- a/compiler/testData/ir/irText/classes/dataClasses.txt +++ b/compiler/testData/ir/irText/classes/dataClasses.txt @@ -86,19 +86,19 @@ FILE fqName: fileName:/dataClasses.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=Test1( - CONST String type=kotlin.String value=x= + CONST String type=kotlin.String value="Test1(" + CONST String type=kotlin.String value="x=" CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=y= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="y=" CALL '(): String' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=z= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="z=" CALL '(): Any' type=kotlin.Any origin=GET_PROPERTY $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test1) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: @@ -225,11 +225,11 @@ FILE fqName: fileName:/dataClasses.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=Test2( - CONST String type=kotlin.String value=x= + CONST String type=kotlin.String value="Test2(" + CONST String type=kotlin.String value="x=" CALL '(): Any?' type=kotlin.Any? origin=GET_PROPERTY $this: GET_VAR 'this@Test2: Test2' type=Test2 origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test2) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: @@ -400,23 +400,23 @@ FILE fqName: fileName:/dataClasses.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=Test3( - CONST String type=kotlin.String value=d= + CONST String type=kotlin.String value="Test3(" + CONST String type=kotlin.String value="d=" CALL '(): Double' type=kotlin.Double origin=GET_PROPERTY $this: GET_VAR 'this@Test3: Test3' type=Test3 origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=dn= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="dn=" CALL '(): Double?' type=kotlin.Double? origin=GET_PROPERTY $this: GET_VAR 'this@Test3: Test3' type=Test3 origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=f= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="f=" CALL '(): Float' type=kotlin.Float origin=GET_PROPERTY $this: GET_VAR 'this@Test3: Test3' type=Test3 origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=df= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="df=" CALL '(): Float?' type=kotlin.Float? origin=GET_PROPERTY $this: GET_VAR 'this@Test3: Test3' type=Test3 origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test3) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: diff --git a/compiler/testData/ir/irText/classes/dataClassesGeneric.txt b/compiler/testData/ir/irText/classes/dataClassesGeneric.txt index 5c34d4ce39f..2ba060c4e05 100644 --- a/compiler/testData/ir/irText/classes/dataClassesGeneric.txt +++ b/compiler/testData/ir/irText/classes/dataClassesGeneric.txt @@ -42,11 +42,11 @@ FILE fqName: fileName:/dataClassesGeneric.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=Test1( - CONST String type=kotlin.String value=x= + CONST String type=kotlin.String value="Test1(" + CONST String type=kotlin.String value="x=" CALL '(): T' type=T origin=GET_PROPERTY $this: GET_VAR 'this@Test1: Test1' type=Test1 origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test1) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: @@ -150,11 +150,11 @@ FILE fqName: fileName:/dataClassesGeneric.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=Test2( - CONST String type=kotlin.String value=x= + CONST String type=kotlin.String value="Test2(" + CONST String type=kotlin.String value="x=" CALL '(): T' type=T origin=GET_PROPERTY $this: GET_VAR 'this@Test2: Test2' type=Test2 origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test2) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: @@ -247,11 +247,11 @@ FILE fqName: fileName:/dataClassesGeneric.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=Test3( - CONST String type=kotlin.String value=x= + CONST String type=kotlin.String value="Test3(" + CONST String type=kotlin.String value="x=" CALL '(): List' type=kotlin.collections.List origin=GET_PROPERTY $this: GET_VAR 'this@Test3: Test3' type=Test3 origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test3) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: @@ -342,11 +342,11 @@ FILE fqName: fileName:/dataClassesGeneric.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=Test4( - CONST String type=kotlin.String value=x= + CONST String type=kotlin.String value="Test4(" + CONST String type=kotlin.String value="x=" CALL '(): List' type=kotlin.collections.List origin=GET_PROPERTY $this: GET_VAR 'this@Test4: Test4' type=Test4 origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test4) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: diff --git a/compiler/testData/ir/irText/classes/delegatedImplementation.txt b/compiler/testData/ir/irText/classes/delegatedImplementation.txt index f38b2c09221..159209b487d 100644 --- a/compiler/testData/ir/irText/classes/delegatedImplementation.txt +++ b/compiler/testData/ir/irText/classes/delegatedImplementation.txt @@ -290,7 +290,7 @@ FILE fqName: fileName:/delegatedImplementation.kt FIELD DELEGATE name:Test2$IOther$delegate type:IOther visibility:private flags:final EXPRESSION_BODY CALL 'otherImpl(String, Int): IOther' type=IOther origin=null - x0: CONST String type=kotlin.String value= + x0: CONST String type=kotlin.String value="" y0: CONST Int type=kotlin.Int value=42 PROPERTY DELEGATED_MEMBER name:z1 visibility:public modality:OPEN flags:val FUN DELEGATED_MEMBER name: visibility:public modality:OPEN <> ($this:Test2, $receiver:kotlin.Byte) returnType:kotlin.Int flags: diff --git a/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt b/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt index 5d526006835..e51a7979156 100644 --- a/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt +++ b/compiler/testData/ir/irText/classes/delegatingConstructorCallToTypeAliasConstructor.txt @@ -39,7 +39,7 @@ FILE fqName: fileName:/delegatingConstructorCallToTypeAliasConstructor.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Cell(String)' : kotlin.String - value: CONST String type=kotlin.String value=O + value: CONST String type=kotlin.String value="O" INSTANCE_INITIALIZER_CALL classDescriptor='C1' PROPERTY FAKE_OVERRIDE name:value visibility:public modality:FINAL flags:val FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:Cell) returnType:kotlin.String flags: @@ -66,7 +66,7 @@ FILE fqName: fileName:/delegatingConstructorCallToTypeAliasConstructor.kt BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Cell(String)' : kotlin.String - value: CONST String type=kotlin.String value=K + value: CONST String type=kotlin.String value="K" INSTANCE_INITIALIZER_CALL classDescriptor='C2' PROPERTY FAKE_OVERRIDE name:value visibility:public modality:FINAL flags:val FUN FAKE_OVERRIDE name: visibility:public modality:FINAL <> ($this:Cell) returnType:kotlin.String flags: diff --git a/compiler/testData/ir/irText/classes/enum.txt b/compiler/testData/ir/irText/classes/enum.txt index efc4d8d5515..be4c2f6fab9 100644 --- a/compiler/testData/ir/irText/classes/enum.txt +++ b/compiler/testData/ir/irText/classes/enum.txt @@ -155,7 +155,7 @@ FILE fqName: fileName:/enum.kt $this: VALUE_PARAMETER name: type:TestEnum3.TEST flags: BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=Hello, world! + message: CONST String type=kotlin.String value="Hello, world!" FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any flags: overridden: FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any flags: diff --git a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt index 77a0107a92e..9c468c780a9 100644 --- a/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt +++ b/compiler/testData/ir/irText/classes/enumWithSecondaryCtor.txt @@ -181,7 +181,7 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt $this: VALUE_PARAMETER name: type:Test2.ZERO flags: BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=ZERO + message: CONST String type=kotlin.String value="ZERO" FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any flags: overridden: FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any flags: @@ -250,7 +250,7 @@ FILE fqName: fileName:/enumWithSecondaryCtor.kt $this: VALUE_PARAMETER name: type:Test2.ONE flags: BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=ONE + message: CONST String type=kotlin.String value="ONE" FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any flags: overridden: FUN FAKE_OVERRIDE name:clone visibility:protected modality:FINAL <> ($this:kotlin.Enum) returnType:kotlin.Any flags: diff --git a/compiler/testData/ir/irText/classes/initBlock.txt b/compiler/testData/ir/irText/classes/initBlock.txt index ee78b5767d5..ddb4b1f5ee6 100644 --- a/compiler/testData/ir/irText/classes/initBlock.txt +++ b/compiler/testData/ir/irText/classes/initBlock.txt @@ -82,7 +82,7 @@ FILE fqName: fileName:/initBlock.kt ANONYMOUS_INITIALIZER Test4 BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=1 + message: CONST String type=kotlin.String value="1" CONSTRUCTOR visibility:public <> () returnType:Test4 flags: BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' @@ -90,7 +90,7 @@ FILE fqName: fileName:/initBlock.kt ANONYMOUS_INITIALIZER Test4 BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=2 + message: CONST String type=kotlin.String value="2" FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: @@ -113,7 +113,7 @@ FILE fqName: fileName:/initBlock.kt ANONYMOUS_INITIALIZER Test5 BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=1 + message: CONST String type=kotlin.String value="1" CLASS CLASS name:TestInner modality:FINAL visibility:public flags:inner superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Test5.TestInner flags: CONSTRUCTOR visibility:public <> ($this:Test5) returnType:Test5.TestInner flags:primary @@ -124,7 +124,7 @@ FILE fqName: fileName:/initBlock.kt ANONYMOUS_INITIALIZER TestInner BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=2 + message: CONST String type=kotlin.String value="2" FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: diff --git a/compiler/testData/ir/irText/classes/inlineClass.txt b/compiler/testData/ir/irText/classes/inlineClass.txt index cfabb2769bb..3e587b454af 100644 --- a/compiler/testData/ir/irText/classes/inlineClass.txt +++ b/compiler/testData/ir/irText/classes/inlineClass.txt @@ -24,11 +24,11 @@ FILE fqName: fileName:/inlineClass.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=Test( - CONST String type=kotlin.String value=x= + CONST String type=kotlin.String value="Test(" + CONST String type=kotlin.String value="x=" CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'this@Test: Test' type=Test origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_INLINE_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: diff --git a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt index a3f81d3fd09..84bee2fea5a 100644 --- a/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt +++ b/compiler/testData/ir/irText/classes/lambdaInDataClassDefaultParameter.txt @@ -49,11 +49,11 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=A( - CONST String type=kotlin.String value=runA= + CONST String type=kotlin.String value="A(" + CONST String type=kotlin.String value="runA=" CALL '(): A.(String) -> Unit' type=A.(kotlin.String) -> kotlin.Unit origin=GET_PROPERTY $this: GET_VAR 'this@A: A' type=A origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:A) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: @@ -166,11 +166,11 @@ FILE fqName: fileName:/lambdaInDataClassDefaultParameter.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=B( - CONST String type=kotlin.String value=x= + CONST String type=kotlin.String value="B(" + CONST String type=kotlin.String value="x=" CALL '(): Any' type=kotlin.Any origin=GET_PROPERTY $this: GET_VAR 'this@B: B' type=B origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:B) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: diff --git a/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt b/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt index f57904fd536..e2a364170f5 100644 --- a/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt +++ b/compiler/testData/ir/irText/classes/objectLiteralExpressions.txt @@ -61,7 +61,7 @@ FILE fqName: fileName:/objectLiteralExpressions.kt $this: VALUE_PARAMETER name: type:test2. flags: BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=foo + message: CONST String type=kotlin.String value="foo" FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: @@ -129,7 +129,7 @@ FILE fqName: fileName:/objectLiteralExpressions.kt $this: VALUE_PARAMETER name: type:Outer.test3. flags: BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=foo + message: CONST String type=kotlin.String value="foo" FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: @@ -175,7 +175,7 @@ FILE fqName: fileName:/objectLiteralExpressions.kt $this: VALUE_PARAMETER name: type:test4. flags: BLOCK_BODY CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=foo + message: CONST String type=kotlin.String value="foo" FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: diff --git a/compiler/testData/ir/irText/classes/superCalls.txt b/compiler/testData/ir/irText/classes/superCalls.txt index 5890d71d4dd..3271b71064a 100644 --- a/compiler/testData/ir/irText/classes/superCalls.txt +++ b/compiler/testData/ir/irText/classes/superCalls.txt @@ -11,7 +11,7 @@ FILE fqName: fileName:/superCalls.kt PROPERTY name:bar visibility:public modality:OPEN flags:val FIELD PROPERTY_BACKING_FIELD name:bar type:kotlin.String visibility:public flags:final EXPRESSION_BODY - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:OPEN <> ($this:Base) returnType:kotlin.String flags: correspondingProperty: PROPERTY name:bar visibility:public modality:OPEN flags:val $this: VALUE_PARAMETER name: type:Base flags: diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.txt index 51f7429cb48..1fe96b1754a 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsWithDefaultParameterValues.txt @@ -4,7 +4,7 @@ FILE fqName: fileName:/annotationsWithDefaultParameterValues.kt CONSTRUCTOR visibility:public <> (x:kotlin.String, y:kotlin.Int) returnType:A flags:primary VALUE_PARAMETER name:x index:0 type:kotlin.String flags: EXPRESSION_BODY - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" VALUE_PARAMETER name:y index:1 type:kotlin.Int flags: EXPRESSION_BODY CONST Int type=kotlin.Int value=42 @@ -46,18 +46,18 @@ FILE fqName: fileName:/annotationsWithDefaultParameterValues.kt FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: annotations: CALL 'constructor A(String = ..., Int = ...)' type=A origin=null - x: CONST String type=kotlin.String value=abc + x: CONST String type=kotlin.String value="abc" y: CONST Int type=kotlin.Int value=123 BLOCK_BODY FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: annotations: CALL 'constructor A(String = ..., Int = ...)' type=A origin=null - x: CONST String type=kotlin.String value=def + x: CONST String type=kotlin.String value="def" BLOCK_BODY FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: annotations: CALL 'constructor A(String = ..., Int = ...)' type=A origin=null - x: CONST String type=kotlin.String value=ghi + x: CONST String type=kotlin.String value="ghi" BLOCK_BODY FUN name:test4 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: annotations: diff --git a/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.txt b/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.txt index 8c5d9fbcdab..175fb79581f 100644 --- a/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.txt +++ b/compiler/testData/ir/irText/declarations/annotations/annotationsWithVarargParameters.txt @@ -31,14 +31,14 @@ FILE fqName: fileName:/annotationsWithVarargParameters.kt annotations: CALL 'constructor A(vararg String)' type=A origin=null xs: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=abc - CONST String type=kotlin.String value=def + CONST String type=kotlin.String value="abc" + CONST String type=kotlin.String value="def" BLOCK_BODY FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: annotations: CALL 'constructor A(vararg String)' type=A origin=null xs: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=abc + CONST String type=kotlin.String value="abc" BLOCK_BODY FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: annotations: diff --git a/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.txt index 4cb010e3986..8806a802933 100644 --- a/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/arrayInAnnotationArguments.txt @@ -64,9 +64,9 @@ FILE fqName: fileName:/arrayInAnnotationArguments.kt CONST Int type=kotlin.Int value=3 CALL 'constructor TestAnnWithStringArray(Array)' type=TestAnnWithStringArray origin=null x: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=a - CONST String type=kotlin.String value=b - CONST String type=kotlin.String value=c + CONST String type=kotlin.String value="a" + CONST String type=kotlin.String value="b" + CONST String type=kotlin.String value="c" CALL 'constructor TestAnnWithIntArray(IntArray)' type=TestAnnWithIntArray origin=null x: VARARG type=kotlin.IntArray varargElementType=kotlin.Int CONST Int type=kotlin.Int value=1 @@ -74,9 +74,9 @@ FILE fqName: fileName:/arrayInAnnotationArguments.kt CONST Int type=kotlin.Int value=3 CALL 'constructor TestAnnWithStringArray(Array)' type=TestAnnWithStringArray origin=null x: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=a - CONST String type=kotlin.String value=b - CONST String type=kotlin.String value=c + CONST String type=kotlin.String value="a" + CONST String type=kotlin.String value="b" + CONST String type=kotlin.String value="c" BLOCK_BODY FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: annotations: @@ -87,9 +87,9 @@ FILE fqName: fileName:/arrayInAnnotationArguments.kt CONST Int type=kotlin.Int value=6 CALL 'constructor TestAnnWithStringArray(Array)' type=TestAnnWithStringArray origin=null x: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=d - CONST String type=kotlin.String value=e - CONST String type=kotlin.String value=f + CONST String type=kotlin.String value="d" + CONST String type=kotlin.String value="e" + CONST String type=kotlin.String value="f" CALL 'constructor TestAnnWithIntArray(IntArray)' type=TestAnnWithIntArray origin=null x: VARARG type=kotlin.IntArray varargElementType=kotlin.Int CONST Int type=kotlin.Int value=4 @@ -97,8 +97,8 @@ FILE fqName: fileName:/arrayInAnnotationArguments.kt CONST Int type=kotlin.Int value=6 CALL 'constructor TestAnnWithStringArray(Array)' type=TestAnnWithStringArray origin=null x: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=d - CONST String type=kotlin.String value=e - CONST String type=kotlin.String value=f + CONST String type=kotlin.String value="d" + CONST String type=kotlin.String value="e" + CONST String type=kotlin.String value="f" BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt index d917bcf4381..dc45a0dd761 100644 --- a/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/classesWithAnnotations.txt @@ -30,7 +30,7 @@ FILE fqName: fileName:/classesWithAnnotations.kt CLASS CLASS name:TestClass modality:FINAL visibility:public flags: superTypes:[kotlin.Any] annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=class + x: CONST String type=kotlin.String value="class" $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:TestClass flags: CONSTRUCTOR visibility:public <> () returnType:TestClass flags:primary BLOCK_BODY @@ -52,7 +52,7 @@ FILE fqName: fileName:/classesWithAnnotations.kt CLASS INTERFACE name:TestInterface modality:ABSTRACT visibility:public flags: superTypes:[kotlin.Any] annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=interface + x: CONST String type=kotlin.String value="interface" $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:TestInterface flags: FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: @@ -70,7 +70,7 @@ FILE fqName: fileName:/classesWithAnnotations.kt CLASS OBJECT name:TestObject modality:FINAL visibility:public flags: superTypes:[kotlin.Any] annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=object + x: CONST String type=kotlin.String value="object" $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:TestObject flags: CONSTRUCTOR visibility:private <> () returnType:TestObject flags:primary BLOCK_BODY @@ -98,7 +98,7 @@ FILE fqName: fileName:/classesWithAnnotations.kt CLASS OBJECT name:TestCompanion modality:FINAL visibility:public flags:companion superTypes:[kotlin.Any] annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=companion + x: CONST String type=kotlin.String value="companion" $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:Host.TestCompanion flags: CONSTRUCTOR visibility:private <> () returnType:Host.TestCompanion flags:primary BLOCK_BODY @@ -133,7 +133,7 @@ FILE fqName: fileName:/classesWithAnnotations.kt CLASS ENUM_CLASS name:TestEnum modality:FINAL visibility:public flags: superTypes:[kotlin.Enum] annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=enum + x: CONST String type=kotlin.String value="enum" $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:TestEnum flags: CONSTRUCTOR visibility:private <> () returnType:TestEnum flags:primary BLOCK_BODY @@ -190,7 +190,7 @@ FILE fqName: fileName:/classesWithAnnotations.kt CLASS ANNOTATION_CLASS name:TestAnnotation modality:FINAL visibility:public flags: superTypes:[kotlin.Annotation] annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=annotation + x: CONST String type=kotlin.String value="annotation" $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:TestAnnotation flags: CONSTRUCTOR visibility:public <> () returnType:TestAnnotation flags:primary FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: diff --git a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt index de8b9b15ef4..8dc526d2cbb 100644 --- a/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/delegatedPropertyAccessorsWithAnnotations.txt @@ -91,7 +91,7 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int flags: annotations: CALL 'constructor A(String)' type=A origin=null - x: CONST String type=kotlin.String value=test1.get + x: CONST String type=kotlin.String value="test1.get" correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:delegated,val BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' @@ -107,7 +107,7 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Int flags: annotations: CALL 'constructor A(String)' type=A origin=null - x: CONST String type=kotlin.String value=test2.get + x: CONST String type=kotlin.String value="test2.get" correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL flags:delegated,var BLOCK_BODY RETURN type=kotlin.Nothing from='(): Int' @@ -118,12 +118,12 @@ FILE fqName: fileName:/delegatedPropertyAccessorsWithAnnotations.kt FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.Int) returnType:kotlin.Unit flags: annotations: CALL 'constructor A(String)' type=A origin=null - x: CONST String type=kotlin.String value=test2.set + x: CONST String type=kotlin.String value="test2.set" correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL flags:delegated,var VALUE_PARAMETER name: index:0 type:kotlin.Int flags: annotations: CALL 'constructor A(String)' type=A origin=null - x: CONST String type=kotlin.String value=test2.set.param + x: CONST String type=kotlin.String value="test2.set.param" BLOCK_BODY RETURN type=kotlin.Nothing from='(Int): Unit' CALL 'setValue(Any?, Any?, Int): Unit' type=kotlin.Unit origin=null diff --git a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt index 689b04e929f..df53738ab74 100644 --- a/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/enumEntriesWithAnnotations.txt @@ -37,17 +37,17 @@ FILE fqName: fileName:/enumEntriesWithAnnotations.kt ENUM_ENTRY name:ENTRY1 annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=ENTRY1 + x: CONST String type=kotlin.String value="ENTRY1" init: ENUM_CONSTRUCTOR_CALL 'constructor TestEnum()' ENUM_ENTRY name:ENTRY2 annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=ENTRY2 + x: CONST String type=kotlin.String value="ENTRY2" init: ENUM_CONSTRUCTOR_CALL 'constructor ENTRY2()' class: CLASS ENUM_ENTRY name:ENTRY2 modality:FINAL visibility:public flags: superTypes:[TestEnum] annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=ENTRY2 + x: CONST String type=kotlin.String value="ENTRY2" $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:TestEnum.ENTRY2 flags: CONSTRUCTOR visibility:private <> () returnType:TestEnum.ENTRY2 flags:primary BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.txt index f10cf5c2ba1..45b5919dd02 100644 --- a/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/fieldsWithAnnotations.txt @@ -31,9 +31,9 @@ FILE fqName: fileName:/fieldsWithAnnotations.kt FIELD PROPERTY_BACKING_FIELD name:testVal type:kotlin.String visibility:public flags:final,static annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=testVal.field + x: CONST String type=kotlin.String value="testVal.field" EXPRESSION_BODY - CONST String type=kotlin.String value=a val + CONST String type=kotlin.String value="a val" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:testVal visibility:public modality:FINAL flags:val BLOCK_BODY @@ -43,9 +43,9 @@ FILE fqName: fileName:/fieldsWithAnnotations.kt FIELD PROPERTY_BACKING_FIELD name:testVar type:kotlin.String visibility:public flags:static annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=testVar.field + x: CONST String type=kotlin.String value="testVar.field" EXPRESSION_BODY - CONST String type=kotlin.String value=a var + CONST String type=kotlin.String value="a var" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:testVar visibility:public modality:FINAL flags:var BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.txt index 31350fe4ba4..0786e2bc7b7 100644 --- a/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/fileAnnotations.txt @@ -3,7 +3,7 @@ FILE fqName:test fileName:/fileAnnotations.kt @test.A(x = "File annotation") annotations: CALL 'constructor A(String)' type=test.A origin=null - x: CONST String type=kotlin.String value=File annotation + x: CONST String type=kotlin.String value="File annotation" CLASS ANNOTATION_CLASS name:A modality:FINAL visibility:public flags: superTypes:[kotlin.Annotation] annotations: CALL 'constructor Target(vararg AnnotationTarget)' type=kotlin.annotation.Target origin=null diff --git a/compiler/testData/ir/irText/declarations/annotations/javaAnnotation.txt b/compiler/testData/ir/irText/declarations/annotations/javaAnnotation.txt index ef15f30e691..76871fb583c 100644 --- a/compiler/testData/ir/irText/declarations/annotations/javaAnnotation.txt +++ b/compiler/testData/ir/irText/declarations/annotations/javaAnnotation.txt @@ -6,13 +6,13 @@ FILE fqName: fileName:/javaAnnotation.kt FUN name:test2 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: annotations: CALL 'constructor JavaAnn(String = ..., Int = ...)' type=JavaAnn origin=null - value: CONST String type=kotlin.String value=abc + value: CONST String type=kotlin.String value="abc" i: CONST Int type=kotlin.Int value=123 BLOCK_BODY FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: annotations: CALL 'constructor JavaAnn(String = ..., Int = ...)' type=JavaAnn origin=null - value: CONST String type=kotlin.String value=abc + value: CONST String type=kotlin.String value="abc" i: CONST Int type=kotlin.Int value=123 BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt index 4be012f17ae..7221f4ae279 100644 --- a/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/localDelegatedPropertiesWithAnnotations.txt @@ -33,7 +33,7 @@ FILE fqName: fileName:/localDelegatedPropertiesWithAnnotations.kt LOCAL_DELEGATED_PROPERTY name:test type:kotlin.Int flags:val annotations: CALL 'constructor A(String)' type=A origin=null - x: CONST String type=kotlin.String value=foo/test + x: CONST String type=kotlin.String value="foo/test" VAR DELEGATE name:test$delegate type:kotlin.Lazy flags:val CALL 'lazy(() -> Int): Lazy' type=kotlin.Lazy origin=null : kotlin.Int diff --git a/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.txt index e1ebcf49360..5ce5fe9ec40 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertiesWithAnnotations.txt @@ -30,10 +30,10 @@ FILE fqName: fileName:/propertiesWithAnnotations.kt PROPERTY name:testVal visibility:public modality:FINAL flags:val annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=testVal.property + x: CONST String type=kotlin.String value="testVal.property" FIELD PROPERTY_BACKING_FIELD name:testVal type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:testVal visibility:public modality:FINAL flags:val BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.txt index 8be43122af7..8ff829dfd29 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsFromClassHeaderWithAnnotations.txt @@ -42,7 +42,7 @@ FILE fqName: fileName:/propertyAccessorsFromClassHeaderWithAnnotations.kt FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:C) returnType:kotlin.Int flags: annotations: CALL 'constructor A(String)' type=A origin=null - x: CONST String type=kotlin.String value=C.x.get + x: CONST String type=kotlin.String value="C.x.get" correspondingProperty: PROPERTY name:x visibility:public modality:FINAL flags:val $this: VALUE_PARAMETER name: type:C flags: BLOCK_BODY @@ -56,7 +56,7 @@ FILE fqName: fileName:/propertyAccessorsFromClassHeaderWithAnnotations.kt FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:C) returnType:kotlin.Int flags: annotations: CALL 'constructor A(String)' type=A origin=null - x: CONST String type=kotlin.String value=C.y.get + x: CONST String type=kotlin.String value="C.y.get" correspondingProperty: PROPERTY name:y visibility:public modality:FINAL flags:var $this: VALUE_PARAMETER name: type:C flags: BLOCK_BODY @@ -66,7 +66,7 @@ FILE fqName: fileName:/propertyAccessorsFromClassHeaderWithAnnotations.kt FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:C, :kotlin.Int) returnType:kotlin.Unit flags: annotations: CALL 'constructor A(String)' type=A origin=null - x: CONST String type=kotlin.String value=C.y.set + x: CONST String type=kotlin.String value="C.y.set" correspondingProperty: PROPERTY name:y visibility:public modality:FINAL flags:var $this: VALUE_PARAMETER name: type:C flags: VALUE_PARAMETER name: index:0 type:kotlin.Int flags: diff --git a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.txt index 78c506af0b4..fc68b504bb0 100644 --- a/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/propertyAccessorsWithAnnotations.txt @@ -31,35 +31,35 @@ FILE fqName: fileName:/propertyAccessorsWithAnnotations.kt FUN name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=test1.get + x: CONST String type=kotlin.String value="test1.get" correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" PROPERTY name:test2 visibility:public modality:FINAL flags:var FUN name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=test2.get + x: CONST String type=kotlin.String value="test2.get" correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL flags:var BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" FUN name: visibility:public modality:FINAL <> (value:kotlin.String) returnType:kotlin.Unit flags: annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=test2.set + x: CONST String type=kotlin.String value="test2.set" correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL flags:var VALUE_PARAMETER name:value index:0 type:kotlin.String flags: BLOCK_BODY PROPERTY name:test3 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=test3.get + x: CONST String type=kotlin.String value="test3.get" correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' @@ -67,11 +67,11 @@ FILE fqName: fileName:/propertyAccessorsWithAnnotations.kt PROPERTY name:test4 visibility:public modality:FINAL flags:var FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.String visibility:public flags:static EXPRESSION_BODY - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=test4.get + x: CONST String type=kotlin.String value="test4.get" correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL flags:var BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' @@ -79,7 +79,7 @@ FILE fqName: fileName:/propertyAccessorsWithAnnotations.kt FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> (:kotlin.String) returnType:kotlin.Unit flags: annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=test4.set + x: CONST String type=kotlin.String value="test4.set" correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL flags:var VALUE_PARAMETER name: index:0 type:kotlin.String flags: BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.txt index ca132e6cc7b..9d0988cb452 100644 --- a/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/receiverParameterWithAnnotations.txt @@ -28,7 +28,7 @@ FILE fqName: fileName:/receiverParameterWithAnnotations.kt CALL 'constructor Ann()' type=Ann origin=null BLOCK_BODY RETURN type=kotlin.Nothing from='f() on String: String' - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" PROPERTY name:p visibility:public modality:FINAL flags:val FUN name: visibility:public modality:FINAL <> ($this:A, $receiver:kotlin.String?) returnType:kotlin.String flags: correspondingProperty: PROPERTY name:p visibility:public modality:FINAL flags:val @@ -38,7 +38,7 @@ FILE fqName: fileName:/receiverParameterWithAnnotations.kt CALL 'constructor Ann()' type=Ann origin=null BLOCK_BODY RETURN type=kotlin.Nothing from='() on String?: String' - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: @@ -58,7 +58,7 @@ FILE fqName: fileName:/receiverParameterWithAnnotations.kt CALL 'constructor Ann()' type=Ann origin=null BLOCK_BODY RETURN type=kotlin.Nothing from='topLevelF() on String?: String' - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" PROPERTY name:topLevelP visibility:public modality:FINAL flags:val FUN name: visibility:public modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.String flags: correspondingProperty: PROPERTY name:topLevelP visibility:public modality:FINAL flags:val @@ -67,5 +67,4 @@ FILE fqName: fileName:/receiverParameterWithAnnotations.kt CALL 'constructor Ann()' type=Ann origin=null BLOCK_BODY RETURN type=kotlin.Nothing from='() on String: String' - CONST String type=kotlin.String value= - + CONST String type=kotlin.String value="" diff --git a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.txt index d461b333270..fe3b15781a0 100644 --- a/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/spreadOperatorInAnnotationArguments.txt @@ -32,7 +32,7 @@ FILE fqName: fileName:/spreadOperatorInAnnotationArguments.kt CALL 'constructor A(vararg String)' type=A origin=null xs: VARARG type=kotlin.Array varargElementType=kotlin.String VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=a + CONST String type=kotlin.String value="a" VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=b + CONST String type=kotlin.String value="b" BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.txt index f2084056b26..a254b9e2abe 100644 --- a/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/typeAliasesWithAnnotations.txt @@ -34,4 +34,4 @@ FILE fqName: fileName:/typeAliasesWithAnnotations.kt TYPEALIAS typealias TestTypeAlias = String type=kotlin.String annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=TestTypeAlias + x: CONST String type=kotlin.String value="TestTypeAlias" diff --git a/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.txt index c98380165cd..4d18e8605a1 100644 --- a/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/valueParametersWithAnnotations.txt @@ -31,7 +31,7 @@ FILE fqName: fileName:/valueParametersWithAnnotations.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int flags: annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=testFun.x + x: CONST String type=kotlin.String value="testFun.x" BLOCK_BODY CLASS CLASS name:TestClassConstructor1 modality:FINAL visibility:public flags: superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:TestClassConstructor1 flags: @@ -39,7 +39,7 @@ FILE fqName: fileName:/valueParametersWithAnnotations.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int flags: annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=TestClassConstructor1.x + x: CONST String type=kotlin.String value="TestClassConstructor1.x" BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='TestClassConstructor1' diff --git a/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.txt b/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.txt index eb7be832e34..9a346a876b1 100644 --- a/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.txt +++ b/compiler/testData/ir/irText/declarations/annotations/varargsInAnnotationArguments.txt @@ -92,9 +92,9 @@ FILE fqName: fileName:/varargsInAnnotationArguments.kt CONST Int type=kotlin.Int value=3 CALL 'constructor A2(vararg String)' type=A2 origin=null xs: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=a - CONST String type=kotlin.String value=b - CONST String type=kotlin.String value=c + CONST String type=kotlin.String value="a" + CONST String type=kotlin.String value="b" + CONST String type=kotlin.String value="c" CALL 'constructor AA(vararg A1)' type=AA origin=null xs: VARARG type=kotlin.Array varargElementType=A1 CALL 'constructor A1(vararg Int)' type=A1 origin=null @@ -113,9 +113,9 @@ FILE fqName: fileName:/varargsInAnnotationArguments.kt CONST Int type=kotlin.Int value=3 CALL 'constructor A2(vararg String)' type=A2 origin=null xs: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=a - CONST String type=kotlin.String value=b - CONST String type=kotlin.String value=c + CONST String type=kotlin.String value="a" + CONST String type=kotlin.String value="b" + CONST String type=kotlin.String value="c" CALL 'constructor AA(vararg A1)' type=AA origin=null xs: VARARG type=kotlin.Array varargElementType=A1 CALL 'constructor A1(vararg Int)' type=A1 origin=null @@ -134,9 +134,9 @@ FILE fqName: fileName:/varargsInAnnotationArguments.kt CONST Int type=kotlin.Int value=3 CALL 'constructor A2(vararg String)' type=A2 origin=null xs: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=a - CONST String type=kotlin.String value=b - CONST String type=kotlin.String value=c + CONST String type=kotlin.String value="a" + CONST String type=kotlin.String value="b" + CONST String type=kotlin.String value="c" CALL 'constructor AA(vararg A1)' type=AA origin=null xs: VARARG type=kotlin.Array varargElementType=A1 CALL 'constructor A1(vararg Int)' type=A1 origin=null diff --git a/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.txt b/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.txt index 7e44f077762..9fcb6f173a8 100644 --- a/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/annotations/variablesWithAnnotations.txt @@ -32,11 +32,10 @@ FILE fqName: fileName:/variablesWithAnnotations.kt VAR name:testVal type:kotlin.String flags:val annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=foo/testVal - CONST String type=kotlin.String value=testVal + x: CONST String type=kotlin.String value="foo/testVal" + CONST String type=kotlin.String value="testVal" VAR name:testVar type:kotlin.String flags:var annotations: CALL 'constructor TestAnn(String)' type=TestAnn origin=null - x: CONST String type=kotlin.String value=foo/testVar - CONST String type=kotlin.String value=testVar - + x: CONST String type=kotlin.String value="foo/testVar" + CONST String type=kotlin.String value="testVar" diff --git a/compiler/testData/ir/irText/declarations/constValInitializers.txt b/compiler/testData/ir/irText/declarations/constValInitializers.txt index 8571982cf1e..9298298ef0a 100644 --- a/compiler/testData/ir/irText/declarations/constValInitializers.txt +++ b/compiler/testData/ir/irText/declarations/constValInitializers.txt @@ -29,7 +29,7 @@ FILE fqName: fileName:/constValInitializers.kt PROPERTY name:STR1 visibility:public modality:FINAL flags:const,val FIELD PROPERTY_BACKING_FIELD name:STR1 type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - CONST String type=kotlin.String value=String1 + CONST String type=kotlin.String value="String1" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:STR1 visibility:public modality:FINAL flags:const,val BLOCK_BODY @@ -38,7 +38,7 @@ FILE fqName: fileName:/constValInitializers.kt PROPERTY name:STR2 visibility:public modality:FINAL flags:const,val FIELD PROPERTY_BACKING_FIELD name:STR2 type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - CONST String type=kotlin.String value=String2 + CONST String type=kotlin.String value="String2" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:STR2 visibility:public modality:FINAL flags:const,val BLOCK_BODY @@ -47,7 +47,7 @@ FILE fqName: fileName:/constValInitializers.kt PROPERTY name:STR3 visibility:public modality:FINAL flags:const,val FIELD PROPERTY_BACKING_FIELD name:STR3 type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - CONST String type=kotlin.String value=String1String2 + CONST String type=kotlin.String value="String1String2" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:STR3 visibility:public modality:FINAL flags:const,val BLOCK_BODY @@ -56,7 +56,7 @@ FILE fqName: fileName:/constValInitializers.kt PROPERTY name:STR4 visibility:public modality:FINAL flags:const,val FIELD PROPERTY_BACKING_FIELD name:STR4 type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - CONST String type=kotlin.String value=String1String2 + CONST String type=kotlin.String value="String1String2" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:STR4 visibility:public modality:FINAL flags:const,val BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/defaultArguments.txt b/compiler/testData/ir/irText/declarations/defaultArguments.txt index 463be40881f..f87767faceb 100644 --- a/compiler/testData/ir/irText/declarations/defaultArguments.txt +++ b/compiler/testData/ir/irText/declarations/defaultArguments.txt @@ -6,7 +6,7 @@ FILE fqName: fileName:/defaultArguments.kt CONST Int type=kotlin.Int value=0 VALUE_PARAMETER name:z index:2 type:kotlin.String flags: EXPRESSION_BODY - CONST String type=kotlin.String value=abc + CONST String type=kotlin.String value="abc" BLOCK_BODY FUN name:local visibility:local modality:FINAL <> (xx:kotlin.Int, yy:kotlin.Int, zz:kotlin.String) returnType:kotlin.Unit flags: VALUE_PARAMETER name:xx index:0 type:kotlin.Int flags: diff --git a/compiler/testData/ir/irText/declarations/fileWithAnnotations.txt b/compiler/testData/ir/irText/declarations/fileWithAnnotations.txt index 9646d514d1c..ac51c6d2e40 100644 --- a/compiler/testData/ir/irText/declarations/fileWithAnnotations.txt +++ b/compiler/testData/ir/irText/declarations/fileWithAnnotations.txt @@ -3,7 +3,7 @@ FILE fqName: fileName:/fileWithAnnotations.kt @kotlin.jvm.JvmName(name = "FileWithAnnotations") annotations: CALL 'constructor JvmName(String)' type=kotlin.jvm.JvmName origin=null - name: CONST String type=kotlin.String value=FileWithAnnotations + name: CONST String type=kotlin.String value="FileWithAnnotations" FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY PROPERTY name:bar visibility:public modality:FINAL flags:val diff --git a/compiler/testData/ir/irText/declarations/parameters/constructor.txt b/compiler/testData/ir/irText/declarations/parameters/constructor.txt index 1224e768e57..9c06bceeb98 100644 --- a/compiler/testData/ir/irText/declarations/parameters/constructor.txt +++ b/compiler/testData/ir/irText/declarations/parameters/constructor.txt @@ -124,7 +124,7 @@ FILE fqName: fileName:/constructor.kt VALUE_PARAMETER name:x index:0 type:kotlin.Int flags: VALUE_PARAMETER name:y index:1 type:kotlin.String flags: EXPRESSION_BODY - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Test3' diff --git a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.txt b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.txt index 4c1f7696737..d7e2e4bea1f 100644 --- a/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.txt +++ b/compiler/testData/ir/irText/declarations/parameters/dataClassMembers.txt @@ -6,7 +6,7 @@ FILE fqName: fileName:/dataClassMembers.kt VALUE_PARAMETER name:x index:0 type:T flags: VALUE_PARAMETER name:y index:1 type:kotlin.String flags: EXPRESSION_BODY - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" BLOCK_BODY DELEGATING_CONSTRUCTOR_CALL 'constructor Any()' INSTANCE_INITIALIZER_CALL classDescriptor='Test' @@ -67,15 +67,15 @@ FILE fqName: fileName:/dataClassMembers.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=Test( - CONST String type=kotlin.String value=x= + CONST String type=kotlin.String value="Test(" + CONST String type=kotlin.String value="x=" CALL '(): T' type=T origin=GET_PROPERTY $this: GET_VAR 'this@Test: Test' type=Test origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=y= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="y=" CALL '(): String' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR 'this@Test: Test' type=Test origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:Test) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: diff --git a/compiler/testData/ir/irText/declarations/parameters/fun.txt b/compiler/testData/ir/irText/declarations/parameters/fun.txt index a5f95d94df7..0ef0e1c4f79 100644 --- a/compiler/testData/ir/irText/declarations/parameters/fun.txt +++ b/compiler/testData/ir/irText/declarations/parameters/fun.txt @@ -10,7 +10,7 @@ FILE fqName: fileName:/fun.kt CONST Int type=kotlin.Int value=0 VALUE_PARAMETER name:j index:1 type:kotlin.String flags: EXPRESSION_BODY - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" BLOCK_BODY FUN name:test3 visibility:public modality:FINAL <> (args:kotlin.Array) returnType:kotlin.Unit flags: VALUE_PARAMETER name:args index:0 type:kotlin.Array varargElementType:kotlin.String flags:vararg diff --git a/compiler/testData/ir/irText/declarations/parameters/localFun.txt b/compiler/testData/ir/irText/declarations/parameters/localFun.txt index cd876652ea1..fa8bcb45e72 100644 --- a/compiler/testData/ir/irText/declarations/parameters/localFun.txt +++ b/compiler/testData/ir/irText/declarations/parameters/localFun.txt @@ -13,7 +13,7 @@ FILE fqName: fileName:/localFun.kt CONST Int type=kotlin.Int value=0 VALUE_PARAMETER name:j index:1 type:kotlin.String flags: EXPRESSION_BODY - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" BLOCK_BODY FUN name:test3 visibility:local modality:FINAL <> (args:kotlin.Array) returnType:kotlin.Unit flags: VALUE_PARAMETER name:args index:0 type:kotlin.Array varargElementType:kotlin.String flags:vararg diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.txt b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.txt index 7f387dda8c1..3b7cf6d29c8 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/differentReceivers.txt @@ -50,7 +50,7 @@ FILE fqName: fileName:/differentReceivers.kt EXPRESSION_BODY CALL 'provideDelegate(Any?, Any) on MyClass: String' type=kotlin.String origin=null $receiver: CALL 'constructor MyClass(String)' type=MyClass origin=null - value: CONST String type=kotlin.String value=O + value: CONST String type=kotlin.String value="O" host: CONST Null type=kotlin.Nothing? value=null p: PROPERTY_REFERENCE 'testO: String' field=null getter='(): String' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: @@ -64,7 +64,7 @@ FILE fqName: fileName:/differentReceivers.kt PROPERTY name:testK visibility:public modality:FINAL flags:delegated,val FIELD DELEGATE name:testK$delegate type:kotlin.String visibility:private flags:final,static EXPRESSION_BODY - CONST String type=kotlin.String value=K + CONST String type=kotlin.String value="K" FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:testK visibility:public modality:FINAL flags:delegated,val BLOCK_BODY diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/local.txt b/compiler/testData/ir/irText/declarations/provideDelegate/local.txt index de7c8ed828f..62033af9316 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/local.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/local.txt @@ -84,7 +84,7 @@ FILE fqName: fileName:/local.kt VAR DELEGATE name:testMember$delegate type:Delegate flags:val CALL 'provideDelegate(Any?, Any?): Delegate' type=Delegate origin=null $this: CALL 'constructor DelegateProvider(String)' type=DelegateProvider origin=null - value: CONST String type=kotlin.String value=OK + value: CONST String type=kotlin.String value="OK" thisRef: CONST Null type=kotlin.Nothing? value=null property: LOCAL_DELEGATED_PROPERTY_REFERENCE 'testMember: String' delegate='`testMember$delegate`: Delegate' getter='(): String' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:kotlin.String flags: diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.txt b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.txt index be4c218989a..c83fe71a9ff 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/localDifferentReceivers.txt @@ -51,7 +51,7 @@ FILE fqName: fileName:/localDifferentReceivers.kt VAR DELEGATE name:testO$delegate type:kotlin.String flags:val CALL 'provideDelegate(Any?, Any) on MyClass: String' type=kotlin.String origin=null $receiver: CALL 'constructor MyClass(String)' type=MyClass origin=null - value: CONST String type=kotlin.String value=O + value: CONST String type=kotlin.String value="O" host: CONST Null type=kotlin.Nothing? value=null p: LOCAL_DELEGATED_PROPERTY_REFERENCE 'testO: String' delegate='`testO$delegate`: String' getter='(): String' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:kotlin.String flags: @@ -63,7 +63,7 @@ FILE fqName: fileName:/localDifferentReceivers.kt p: LOCAL_DELEGATED_PROPERTY_REFERENCE 'testO: String' delegate='`testO$delegate`: String' getter='(): String' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE LOCAL_DELEGATED_PROPERTY name:testK type:kotlin.String flags:val VAR DELEGATE name:testK$delegate type:kotlin.String flags:val - CONST String type=kotlin.String value=K + CONST String type=kotlin.String value="K" FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:local modality:FINAL <> () returnType:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/member.txt b/compiler/testData/ir/irText/declarations/provideDelegate/member.txt index 1e59a919698..b01f848ca12 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/member.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/member.txt @@ -89,7 +89,7 @@ FILE fqName: fileName:/member.kt EXPRESSION_BODY CALL 'provideDelegate(Any?, Any?): Delegate' type=Delegate origin=null $this: CALL 'constructor DelegateProvider(String)' type=DelegateProvider origin=null - value: CONST String type=kotlin.String value=OK + value: CONST String type=kotlin.String value="OK" thisRef: GET_VAR 'this@Host: Host' type=Host origin=null property: PROPERTY_REFERENCE 'testMember: String' field=null getter='(): String' setter=null type=kotlin.reflect.KProperty1 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:Host) returnType:kotlin.String flags: diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.txt b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.txt index ea2a3e0f73f..2e22ddfac90 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/memberExtension.txt @@ -60,7 +60,7 @@ FILE fqName: fileName:/memberExtension.kt EXPRESSION_BODY CALL 'provideDelegate(Any?, Any) on String: Host.StringDelegate' type=Host.StringDelegate origin=null $this: GET_VAR 'this@Host: Host' type=Host origin=null - $receiver: CONST String type=kotlin.String value=K + $receiver: CONST String type=kotlin.String value="K" host: GET_VAR 'this@Host: Host' type=Host origin=null p: PROPERTY_REFERENCE 'plusK: String on String' field=null getter='() on String: String' setter=null type=kotlin.reflect.KProperty2 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:Host, $receiver:kotlin.String) returnType:kotlin.String flags: @@ -79,7 +79,7 @@ FILE fqName: fileName:/memberExtension.kt EXPRESSION_BODY CALL '() on String: String' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR 'this@Host: Host' type=Host origin=null - $receiver: CONST String type=kotlin.String value=O + $receiver: CONST String type=kotlin.String value="O" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:Host) returnType:kotlin.String flags: correspondingProperty: PROPERTY name:ok visibility:public modality:FINAL flags:val $this: VALUE_PARAMETER name: type:Host flags: diff --git a/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.txt b/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.txt index 73d381fe604..cfa364f8465 100644 --- a/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.txt +++ b/compiler/testData/ir/irText/declarations/provideDelegate/topLevel.txt @@ -83,7 +83,7 @@ FILE fqName: fileName:/topLevel.kt EXPRESSION_BODY CALL 'provideDelegate(Any?, Any?): Delegate' type=Delegate origin=null $this: CALL 'constructor DelegateProvider(String)' type=DelegateProvider origin=null - value: CONST String type=kotlin.String value=OK + value: CONST String type=kotlin.String value="OK" thisRef: CONST Null type=kotlin.Nothing? value=null property: PROPERTY_REFERENCE 'testTopLevel: String' field=null getter='(): String' setter=null type=kotlin.reflect.KProperty0 origin=PROPERTY_REFERENCE_FOR_DELEGATE FUN DELEGATED_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: diff --git a/compiler/testData/ir/irText/declarations/typeAlias.txt b/compiler/testData/ir/irText/declarations/typeAlias.txt index 8c069b26855..8b9bf3f9867 100644 --- a/compiler/testData/ir/irText/declarations/typeAlias.txt +++ b/compiler/testData/ir/irText/declarations/typeAlias.txt @@ -6,7 +6,7 @@ FILE fqName: fileName:/typeAlias.kt annotations: CALL 'constructor Suppress(vararg String)' type=kotlin.Suppress origin=null names: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=TOPLEVEL_TYPEALIASES_ONLY + CONST String type=kotlin.String value="TOPLEVEL_TYPEALIASES_ONLY" CLASS CLASS name:C modality:FINAL visibility:public flags: superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:C flags: CONSTRUCTOR visibility:public <> () returnType:C flags:primary @@ -17,7 +17,7 @@ FILE fqName: fileName:/typeAlias.kt annotations: CALL 'constructor Suppress(vararg String)' type=kotlin.Suppress origin=null names: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=TOPLEVEL_TYPEALIASES_ONLY + CONST String type=kotlin.String value="TOPLEVEL_TYPEALIASES_ONLY" FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: diff --git a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt index 4efe3ffc0ef..614a67f2bee 100644 --- a/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt +++ b/compiler/testData/ir/irText/expressions/arrayAugmentedAssignment2.txt @@ -45,7 +45,7 @@ FILE fqName: fileName:/arrayAugmentedAssignment2.kt VAR IR_TEMPORARY_VARIABLE name:tmp0_array type:IA flags:val GET_VAR 'value-parameter a: IA' type=IA origin=null VAR IR_TEMPORARY_VARIABLE name:tmp1_index0 type:kotlin.String flags:val - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" CALL 'set(String, Int) on IA: Unit' type=kotlin.Unit origin=PLUSEQ $this: GET_VAR 'this@test: IB' type=IB origin=null $receiver: GET_VAR 'tmp0_array: IA' type=IA origin=null diff --git a/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt b/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt index 45570ac2bfe..4a6d52c1b90 100644 --- a/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt +++ b/compiler/testData/ir/irText/expressions/augmentedAssignment2.txt @@ -53,39 +53,38 @@ FILE fqName: fileName:/augmentedAssignment2.kt CALL 'constructor A()' type=A origin=null CALL 'plusAssign(String) on A: Unit' type=kotlin.Unit origin=PLUSEQ $receiver: GET_VAR 'a: A' type=A origin=PLUSEQ - s: CONST String type=kotlin.String value=+= + s: CONST String type=kotlin.String value="+=" CALL 'minusAssign(String) on A: Unit' type=kotlin.Unit origin=MINUSEQ $receiver: GET_VAR 'a: A' type=A origin=MINUSEQ - s: CONST String type=kotlin.String value=-= + s: CONST String type=kotlin.String value="-=" CALL 'timesAssign(String) on A: Unit' type=kotlin.Unit origin=MULTEQ $receiver: GET_VAR 'a: A' type=A origin=MULTEQ - s: CONST String type=kotlin.String value=*= + s: CONST String type=kotlin.String value="*=" CALL 'divAssign(String) on A: Unit' type=kotlin.Unit origin=DIVEQ $receiver: GET_VAR 'a: A' type=A origin=DIVEQ - s: CONST String type=kotlin.String value=/= + s: CONST String type=kotlin.String value="/=" CALL 'remAssign(String) on A: Unit' type=kotlin.Unit origin=PERCEQ $receiver: GET_VAR 'a: A' type=A origin=PERCEQ - s: CONST String type=kotlin.String value=*= + s: CONST String type=kotlin.String value="*=" FUN name:testProperty visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY BLOCK type=kotlin.Unit origin=PLUSEQ CALL 'plusAssign(String) on A: Unit' type=kotlin.Unit origin=PLUSEQ $receiver: CALL '(): A' type=A origin=PLUSEQ - s: CONST String type=kotlin.String value=+= + s: CONST String type=kotlin.String value="+=" BLOCK type=kotlin.Unit origin=MINUSEQ CALL 'minusAssign(String) on A: Unit' type=kotlin.Unit origin=MINUSEQ $receiver: CALL '(): A' type=A origin=MINUSEQ - s: CONST String type=kotlin.String value=-= + s: CONST String type=kotlin.String value="-=" BLOCK type=kotlin.Unit origin=MULTEQ CALL 'timesAssign(String) on A: Unit' type=kotlin.Unit origin=MULTEQ $receiver: CALL '(): A' type=A origin=MULTEQ - s: CONST String type=kotlin.String value=*= + s: CONST String type=kotlin.String value="*=" BLOCK type=kotlin.Unit origin=DIVEQ CALL 'divAssign(String) on A: Unit' type=kotlin.Unit origin=DIVEQ $receiver: CALL '(): A' type=A origin=DIVEQ - s: CONST String type=kotlin.String value=/= + s: CONST String type=kotlin.String value="/=" BLOCK type=kotlin.Unit origin=PERCEQ CALL 'remAssign(String) on A: Unit' type=kotlin.Unit origin=PERCEQ $receiver: CALL '(): A' type=A origin=PERCEQ - s: CONST String type=kotlin.String value=%= - + s: CONST String type=kotlin.String value="%=" diff --git a/compiler/testData/ir/irText/expressions/boxOk.txt b/compiler/testData/ir/irText/expressions/boxOk.txt index c55aa19826e..7c28c83c201 100644 --- a/compiler/testData/ir/irText/expressions/boxOk.txt +++ b/compiler/testData/ir/irText/expressions/boxOk.txt @@ -2,5 +2,4 @@ FILE fqName: fileName:/boxOk.kt FUN name:box visibility:public modality:FINAL <> () returnType:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=OK - + CONST String type=kotlin.String value="OK" diff --git a/compiler/testData/ir/irText/expressions/callableReferenceToImportedFromObject.txt b/compiler/testData/ir/irText/expressions/callableReferenceToImportedFromObject.txt index f5c3df6524a..e546889c13d 100644 --- a/compiler/testData/ir/irText/expressions/callableReferenceToImportedFromObject.txt +++ b/compiler/testData/ir/irText/expressions/callableReferenceToImportedFromObject.txt @@ -8,7 +8,7 @@ FILE fqName:test fileName:/callableReferenceToImportedFromObject.kt PROPERTY name:a visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:public flags:final EXPRESSION_BODY - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:test.Foo) returnType:kotlin.String flags: correspondingProperty: PROPERTY name:a visibility:public modality:FINAL flags:val $this: VALUE_PARAMETER name: type:test.Foo flags: @@ -20,7 +20,7 @@ FILE fqName:test fileName:/callableReferenceToImportedFromObject.kt $this: VALUE_PARAMETER name: type:test.Foo flags: BLOCK_BODY RETURN type=kotlin.Nothing from='foo(): String' - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: diff --git a/compiler/testData/ir/irText/expressions/coercionToUnit.txt b/compiler/testData/ir/irText/expressions/coercionToUnit.txt index 9953a701a53..ea1030eafe3 100644 --- a/compiler/testData/ir/irText/expressions/coercionToUnit.txt +++ b/compiler/testData/ir/irText/expressions/coercionToUnit.txt @@ -22,7 +22,7 @@ FILE fqName: fileName:/coercionToUnit.kt typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any] CALL 'add(String): Boolean' type=kotlin.Boolean origin=null $this: GET_VAR 'value-parameter mc: MutableCollection' type=kotlin.collections.MutableCollection origin=null - element: CONST String type=kotlin.String value= + element: CONST String type=kotlin.String value="" FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.Unit flags: BLOCK_BODY TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit @@ -40,7 +40,7 @@ FILE fqName: fileName:/coercionToUnit.kt if: CONST Boolean type=kotlin.Boolean value=true then: CALL 'println(String!): Unit' type=kotlin.Unit origin=null $this: GET_VAR 'tmp0_safe_receiver: PrintStream?' type=java.io.PrintStream? origin=null - x: CONST String type=kotlin.String value=Hello, + x: CONST String type=kotlin.String value="Hello," TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any] BLOCK type=kotlin.Unit? origin=SAFE_CALL @@ -56,5 +56,4 @@ FILE fqName: fileName:/coercionToUnit.kt if: CONST Boolean type=kotlin.Boolean value=true then: CALL 'println(String!): Unit' type=kotlin.Unit origin=null $this: GET_VAR 'tmp1_safe_receiver: PrintStream?' type=java.io.PrintStream? origin=null - x: CONST String type=kotlin.String value=world! - + x: CONST String type=kotlin.String value="world!" diff --git a/compiler/testData/ir/irText/expressions/elvis.txt b/compiler/testData/ir/irText/expressions/elvis.txt index 867218341f0..7fa630fb9e6 100644 --- a/compiler/testData/ir/irText/expressions/elvis.txt +++ b/compiler/testData/ir/irText/expressions/elvis.txt @@ -56,14 +56,14 @@ FILE fqName: fileName:/elvis.kt typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:String modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable; kotlin.CharSequence; java.io.Serializable] GET_VAR 'value-parameter b: Any?' type=kotlin.Any? origin=null then: RETURN type=kotlin.Nothing from='test3(Any?, Any?): String' - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" WHEN type=kotlin.Unit origin=null BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.String? typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:String modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable; kotlin.CharSequence; java.io.Serializable] GET_VAR 'value-parameter a: Any?' type=kotlin.Any? origin=null then: RETURN type=kotlin.Nothing from='test3(Any?, Any?): String' - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" RETURN type=kotlin.Nothing from='test3(Any?, Any?): String' BLOCK type=kotlin.String origin=ELVIS VAR IR_TEMPORARY_VARIABLE name:tmp0_elvis_lhs type:kotlin.Any? flags:val @@ -113,4 +113,3 @@ FILE fqName: fileName:/elvis.kt BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: GET_VAR 'tmp0_elvis_lhs: Any?' type=kotlin.Any? origin=null - diff --git a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt index 7080325ba0c..001317353f0 100644 --- a/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt +++ b/compiler/testData/ir/irText/expressions/enumEntryAsReceiver.txt @@ -19,7 +19,7 @@ FILE fqName: fileName:/enumEntryAsReceiver.kt PROPERTY name:value2 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:value2 type:kotlin.String visibility:public flags:final EXPRESSION_BODY - CONST String type=kotlin.String value=OK + CONST String type=kotlin.String value="OK" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:X.B) returnType:kotlin.String flags: correspondingProperty: PROPERTY name:value2 visibility:public modality:FINAL flags:val $this: VALUE_PARAMETER name: type:X.B flags: diff --git a/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt b/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt index be19c701986..ba8032c41f6 100644 --- a/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt +++ b/compiler/testData/ir/irText/expressions/extFunSafeInvoke.txt @@ -19,5 +19,4 @@ FILE fqName: fileName:/extFunSafeInvoke.kt $this: GET_VAR 'value-parameter fn: Any.(Int, String) -> Unit' type=kotlin.Any.(kotlin.Int, kotlin.String) -> kotlin.Unit origin=VARIABLE_AS_FUNCTION p1: GET_VAR 'tmp0_safe_receiver: Any?' type=kotlin.Any? origin=null p2: CONST Int type=kotlin.Int value=42 - p3: CONST String type=kotlin.String value=Hello - + p3: CONST String type=kotlin.String value="Hello" diff --git a/compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.txt b/compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.txt index 11a6ca05ce1..aa66acb8af7 100644 --- a/compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.txt +++ b/compiler/testData/ir/irText/expressions/extensionPropertyGetterCall.txt @@ -5,7 +5,7 @@ FILE fqName: fileName:/extensionPropertyGetterCall.kt $receiver: VALUE_PARAMETER name: type:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='() on String: String' - CONST String type=kotlin.String value=OK + CONST String type=kotlin.String value="OK" FUN name:test5 visibility:public modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.String flags: $receiver: VALUE_PARAMETER name: type:kotlin.String flags: BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/funImportedFromObject.txt b/compiler/testData/ir/irText/expressions/funImportedFromObject.txt index 13973666236..8e0273bd780 100644 --- a/compiler/testData/ir/irText/expressions/funImportedFromObject.txt +++ b/compiler/testData/ir/irText/expressions/funImportedFromObject.txt @@ -10,7 +10,7 @@ FILE fqName:test fileName:/funImportedFromObject.kt $this: VALUE_PARAMETER name: type:test.Host flags: BLOCK_BODY RETURN type=kotlin.Nothing from='foo(): String' - CONST String type=kotlin.String value=OK + CONST String type=kotlin.String value="OK" FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: diff --git a/compiler/testData/ir/irText/expressions/genericPropertyCall.txt b/compiler/testData/ir/irText/expressions/genericPropertyCall.txt index 886feb94b9f..ea93bec81df 100644 --- a/compiler/testData/ir/irText/expressions/genericPropertyCall.txt +++ b/compiler/testData/ir/irText/expressions/genericPropertyCall.txt @@ -12,7 +12,7 @@ FILE fqName: fileName:/genericPropertyCall.kt EXPRESSION_BODY CALL '() on String: String' type=kotlin.String origin=GET_PROPERTY <`0>: kotlin.String - $receiver: CONST String type=kotlin.String value=abc + $receiver: CONST String type=kotlin.String value="abc" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:test visibility:public modality:FINAL flags:val BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.txt b/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.txt index 4c576f19bb5..2df87557323 100644 --- a/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.txt +++ b/compiler/testData/ir/irText/expressions/implicitCastOnPlatformType.txt @@ -3,5 +3,4 @@ FILE fqName: fileName:/implicitCastOnPlatformType.kt BLOCK_BODY RETURN type=kotlin.Nothing from='test(): String' CALL 'getProperty(String!): String!' type=kotlin.String? origin=null - key: CONST String type=kotlin.String value=test - + key: CONST String type=kotlin.String value="test" diff --git a/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt b/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt index 006f7cda040..d92b5441b9f 100644 --- a/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt +++ b/compiler/testData/ir/irText/expressions/jvmStaticFieldReference.txt @@ -3,14 +3,14 @@ FILE fqName: fileName:/jvmStaticFieldReference.kt BLOCK_BODY CALL 'println(String!): Unit' type=kotlin.Unit origin=null $this: GET_FIELD 'out: PrintStream!' type=java.io.PrintStream? origin=GET_PROPERTY - x: CONST String type=kotlin.String value=testFun + x: CONST String type=kotlin.String value="testFun" PROPERTY name:testProp visibility:public modality:FINAL flags:var FUN name: visibility:public modality:FINAL <> () returnType:kotlin.Any flags: correspondingProperty: PROPERTY name:testProp visibility:public modality:FINAL flags:var BLOCK_BODY CALL 'println(String!): Unit' type=kotlin.Unit origin=null $this: GET_FIELD 'out: PrintStream!' type=java.io.PrintStream? origin=GET_PROPERTY - x: CONST String type=kotlin.String value=testProp/get + x: CONST String type=kotlin.String value="testProp/get" RETURN type=kotlin.Nothing from='(): Any' CONST Int type=kotlin.Int value=42 FUN name: visibility:public modality:FINAL <> (value:kotlin.Any) returnType:kotlin.Unit flags: @@ -19,7 +19,7 @@ FILE fqName: fileName:/jvmStaticFieldReference.kt BLOCK_BODY CALL 'println(String!): Unit' type=kotlin.Unit origin=null $this: GET_FIELD 'out: PrintStream!' type=java.io.PrintStream? origin=GET_PROPERTY - x: CONST String type=kotlin.String value=testProp/set + x: CONST String type=kotlin.String value="testProp/set" CLASS CLASS name:TestClass modality:FINAL visibility:public flags: superTypes:[kotlin.Any] $this: VALUE_PARAMETER INSTANCE_RECEIVER name: type:TestClass flags: CONSTRUCTOR visibility:public <> () returnType:TestClass flags:primary @@ -35,7 +35,7 @@ FILE fqName: fileName:/jvmStaticFieldReference.kt then: BLOCK type=kotlin.Int origin=null CALL 'println(String!): Unit' type=kotlin.Unit origin=null $this: GET_FIELD 'out: PrintStream!' type=java.io.PrintStream? origin=GET_PROPERTY - x: CONST String type=kotlin.String value=TestClass/test + x: CONST String type=kotlin.String value="TestClass/test" CONST Int type=kotlin.Int value=42 FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> ($this:TestClass) returnType:kotlin.Int flags: correspondingProperty: PROPERTY name:test visibility:public modality:FINAL flags:val @@ -48,7 +48,7 @@ FILE fqName: fileName:/jvmStaticFieldReference.kt BLOCK_BODY CALL 'println(String!): Unit' type=kotlin.Unit origin=null $this: GET_FIELD 'out: PrintStream!' type=java.io.PrintStream? origin=GET_PROPERTY - x: CONST String type=kotlin.String value=TestClass/init + x: CONST String type=kotlin.String value="TestClass/init" FUN FAKE_OVERRIDE name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:equals visibility:public modality:OPEN <> ($this:kotlin.Any, other:kotlin.Any?) returnType:kotlin.Boolean flags: diff --git a/compiler/testData/ir/irText/expressions/kt28006.kt b/compiler/testData/ir/irText/expressions/kt28006.kt new file mode 100644 index 00000000000..38f74ebdd30 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/kt28006.kt @@ -0,0 +1,13 @@ +val test1 = "\uD83E\uDD17" +val test2 = "\uD83E\uDD17\uD83E\uDD17" + +const val testConst1 = "\uD83E\uDD17" +const val testConst2 = "\uD83E\uDD17\uD83E\uDD17" +const val testConst3 = "\uD83E\uDD17$testConst2" +const val testConst4 = "$testConst2$testConst2" + +fun test1(x: Int) = "\uD83E\uDD17$x" + +fun test2(x: Int) = "$x\uD83E\uDD17" + +fun test3(x: Int) = "$x\uD83E\uDD17$x" \ No newline at end of file diff --git a/compiler/testData/ir/irText/expressions/kt28006.txt b/compiler/testData/ir/irText/expressions/kt28006.txt new file mode 100644 index 00000000000..ff2ac99df03 --- /dev/null +++ b/compiler/testData/ir/irText/expressions/kt28006.txt @@ -0,0 +1,77 @@ +FILE fqName: fileName:/kt28006.kt + PROPERTY name:test1 visibility:public modality:FINAL flags:val + FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.String visibility:public flags:final,static + EXPRESSION_BODY + CONST String type=kotlin.String value="\uD83E\uDD17" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: + correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:val + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): String' + GET_FIELD 'test1: String' type=kotlin.String origin=null + PROPERTY name:test2 visibility:public modality:FINAL flags:val + FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.String visibility:public flags:final,static + EXPRESSION_BODY + CONST String type=kotlin.String value="\uD83E\uDD17\uD83E\uDD17" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: + correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL flags:val + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): String' + GET_FIELD 'test2: String' type=kotlin.String origin=null + PROPERTY name:testConst1 visibility:public modality:FINAL flags:const,val + FIELD PROPERTY_BACKING_FIELD name:testConst1 type:kotlin.String visibility:public flags:final,static + EXPRESSION_BODY + CONST String type=kotlin.String value="\uD83E\uDD17" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: + correspondingProperty: PROPERTY name:testConst1 visibility:public modality:FINAL flags:const,val + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): String' + GET_FIELD 'testConst1: String' type=kotlin.String origin=null + PROPERTY name:testConst2 visibility:public modality:FINAL flags:const,val + FIELD PROPERTY_BACKING_FIELD name:testConst2 type:kotlin.String visibility:public flags:final,static + EXPRESSION_BODY + CONST String type=kotlin.String value="\uD83E\uDD17\uD83E\uDD17" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: + correspondingProperty: PROPERTY name:testConst2 visibility:public modality:FINAL flags:const,val + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): String' + GET_FIELD 'testConst2: String' type=kotlin.String origin=null + PROPERTY name:testConst3 visibility:public modality:FINAL flags:const,val + FIELD PROPERTY_BACKING_FIELD name:testConst3 type:kotlin.String visibility:public flags:final,static + EXPRESSION_BODY + CONST String type=kotlin.String value="\uD83E\uDD17\uD83E\uDD17\uD83E\uDD17" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: + correspondingProperty: PROPERTY name:testConst3 visibility:public modality:FINAL flags:const,val + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): String' + GET_FIELD 'testConst3: String' type=kotlin.String origin=null + PROPERTY name:testConst4 visibility:public modality:FINAL flags:const,val + FIELD PROPERTY_BACKING_FIELD name:testConst4 type:kotlin.String visibility:public flags:final,static + EXPRESSION_BODY + CONST String type=kotlin.String value="\uD83E\uDD17\uD83E\uDD17\uD83E\uDD17\uD83E\uDD17" + FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: + correspondingProperty: PROPERTY name:testConst4 visibility:public modality:FINAL flags:const,val + BLOCK_BODY + RETURN type=kotlin.Nothing from='(): String' + GET_FIELD 'testConst4: String' type=kotlin.String origin=null + FUN name:test1 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.String flags: + VALUE_PARAMETER name:x index:0 type:kotlin.Int flags: + BLOCK_BODY + RETURN type=kotlin.Nothing from='test1(Int): String' + STRING_CONCATENATION type=kotlin.String + CONST String type=kotlin.String value="\uD83E\uDD17" + GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null + FUN name:test2 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.String flags: + VALUE_PARAMETER name:x index:0 type:kotlin.Int flags: + BLOCK_BODY + RETURN type=kotlin.Nothing from='test2(Int): String' + STRING_CONCATENATION type=kotlin.String + GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null + CONST String type=kotlin.String value="\uD83E\uDD17" + FUN name:test3 visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.String flags: + VALUE_PARAMETER name:x index:0 type:kotlin.Int flags: + BLOCK_BODY + RETURN type=kotlin.Nothing from='test3(Int): String' + STRING_CONCATENATION type=kotlin.String + GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null + CONST String type=kotlin.String value="\uD83E\uDD17" + GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null diff --git a/compiler/testData/ir/irText/expressions/literals.txt b/compiler/testData/ir/irText/expressions/literals.txt index db59668c096..15d1704a277 100644 --- a/compiler/testData/ir/irText/expressions/literals.txt +++ b/compiler/testData/ir/irText/expressions/literals.txt @@ -38,7 +38,7 @@ FILE fqName: fileName:/literals.kt PROPERTY name:test5 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test5 type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - CONST String type=kotlin.String value=abc + CONST String type=kotlin.String value="abc" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:test5 visibility:public modality:FINAL flags:val BLOCK_BODY @@ -110,7 +110,7 @@ FILE fqName: fileName:/literals.kt PROPERTY name:test13 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test13 type:kotlin.Char visibility:public flags:final,static EXPRESSION_BODY - CONST Char type=kotlin.Char value=a + CONST Char type=kotlin.Char value='a' FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Char flags: correspondingProperty: PROPERTY name:test13 visibility:public modality:FINAL flags:val BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.txt b/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.txt index da81ea08f80..063c0e74386 100644 --- a/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.txt +++ b/compiler/testData/ir/irText/expressions/objectReferenceInFieldInitializer.txt @@ -8,7 +8,7 @@ FILE fqName: fileName:/objectReferenceInFieldInitializer.kt PROPERTY name:a visibility:private modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:a type:kotlin.String visibility:private flags:final EXPRESSION_BODY - CONST String type=kotlin.String value=$ + CONST String type=kotlin.String value="$" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:A) returnType:kotlin.String flags: correspondingProperty: PROPERTY name:a visibility:private modality:FINAL flags:val $this: VALUE_PARAMETER name: type:A flags: @@ -20,7 +20,7 @@ FILE fqName: fileName:/objectReferenceInFieldInitializer.kt FIELD PROPERTY_BACKING_FIELD name:b type:kotlin.String visibility:private flags:final EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=1234 + CONST String type=kotlin.String value="1234" CALL '(): String' type=kotlin.String origin=GET_PROPERTY $this: GET_VAR 'this@A: A' type=A origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:private modality:FINAL <> ($this:A) returnType:kotlin.String flags: diff --git a/compiler/testData/ir/irText/expressions/references.txt b/compiler/testData/ir/irText/expressions/references.txt index 09d1cca82ef..996ca9e450c 100644 --- a/compiler/testData/ir/irText/expressions/references.txt +++ b/compiler/testData/ir/irText/expressions/references.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/references.kt PROPERTY name:ok visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:ok type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - CONST String type=kotlin.String value=OK + CONST String type=kotlin.String value="OK" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:ok visibility:public modality:FINAL flags:val BLOCK_BODY @@ -22,7 +22,7 @@ FILE fqName: fileName:/references.kt correspondingProperty: PROPERTY name:ok3 visibility:public modality:FINAL flags:val BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' - CONST String type=kotlin.String value=OK + CONST String type=kotlin.String value="OK" FUN name:test1 visibility:public modality:FINAL <> () returnType:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test1(): String' @@ -35,7 +35,7 @@ FILE fqName: fileName:/references.kt FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.String flags: BLOCK_BODY VAR name:x type:kotlin.String flags:val - CONST String type=kotlin.String value=OK + CONST String type=kotlin.String value="OK" RETURN type=kotlin.Nothing from='test3(): String' GET_VAR 'x: String' type=kotlin.String origin=null FUN name:test4 visibility:public modality:FINAL <> () returnType:kotlin.String flags: @@ -48,7 +48,7 @@ FILE fqName: fileName:/references.kt $receiver: VALUE_PARAMETER name: type:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='() on String: String' - CONST String type=kotlin.String value=OK + CONST String type=kotlin.String value="OK" FUN name:test5 visibility:public modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.String flags: $receiver: VALUE_PARAMETER name: type:kotlin.String flags: BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/smartCasts.txt b/compiler/testData/ir/irText/expressions/smartCasts.txt index 3d868777881..b413b6353ff 100644 --- a/compiler/testData/ir/irText/expressions/smartCasts.txt +++ b/compiler/testData/ir/irText/expressions/smartCasts.txt @@ -53,7 +53,7 @@ FILE fqName: fileName:/smartCasts.kt typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:String modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable; kotlin.CharSequence; java.io.Serializable] GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='test2(Any): String' - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" RETURN type=kotlin.Nothing from='test2(Any): String' CALL 'overloaded(String): String' type=kotlin.String origin=null s: TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String @@ -68,7 +68,7 @@ FILE fqName: fileName:/smartCasts.kt typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:String modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable; kotlin.CharSequence; java.io.Serializable] GET_VAR 'value-parameter x: Any' type=kotlin.Any origin=null then: RETURN type=kotlin.Nothing from='test3(Any): String' - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" RETURN type=kotlin.Nothing from='test3(Any): String' TYPE_OP type=kotlin.String origin=IMPLICIT_CAST typeOperand=kotlin.String typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:String modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable; kotlin.CharSequence; java.io.Serializable] diff --git a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt index 4cb6a55483d..86596eeea4d 100644 --- a/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt +++ b/compiler/testData/ir/irText/expressions/smartCastsWithDestructuring.txt @@ -38,7 +38,7 @@ FILE fqName: fileName:/smartCastsWithDestructuring.kt $receiver: VALUE_PARAMETER name: type:I2 flags: BLOCK_BODY RETURN type=kotlin.Nothing from='component2() on I2: String' - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" FUN name:test visibility:public modality:FINAL <> (x:I1) returnType:kotlin.Unit flags: VALUE_PARAMETER name:x index:0 type:I1 flags: BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/stringPlus.txt b/compiler/testData/ir/irText/expressions/stringPlus.txt index 1decf424bb1..41d3e77ed0e 100644 --- a/compiler/testData/ir/irText/expressions/stringPlus.txt +++ b/compiler/testData/ir/irText/expressions/stringPlus.txt @@ -15,7 +15,7 @@ FILE fqName: fileName:/stringPlus.kt CALL 'plus(Any?): String' type=kotlin.String origin=PLUS $this: CALL 'plus(Any?): String' type=kotlin.String origin=PLUS $this: GET_VAR 'value-parameter a: String' type=kotlin.String origin=null - other: CONST String type=kotlin.String value=+ + other: CONST String type=kotlin.String value="+" other: GET_VAR 'value-parameter b: Int' type=kotlin.Int origin=null FUN name:test3 visibility:public modality:FINAL <> (a:kotlin.String, b:kotlin.Int) returnType:kotlin.String flags: VALUE_PARAMETER name:a index:0 type:kotlin.String flags: @@ -26,7 +26,7 @@ FILE fqName: fileName:/stringPlus.kt $this: CALL 'plus(Any?): String' type=kotlin.String origin=PLUS $this: CALL 'plus(Any?): String' type=kotlin.String origin=PLUS $this: GET_VAR 'value-parameter a: String' type=kotlin.String origin=null - other: CONST String type=kotlin.String value=+ + other: CONST String type=kotlin.String value="+" other: CALL 'plus(Int): Int' type=kotlin.Int origin=PLUS $this: GET_VAR 'value-parameter b: Int' type=kotlin.Int origin=null other: CONST Int type=kotlin.Int value=1 diff --git a/compiler/testData/ir/irText/expressions/stringTemplates.txt b/compiler/testData/ir/irText/expressions/stringTemplates.txt index dfc23a29909..4679c949c5a 100644 --- a/compiler/testData/ir/irText/expressions/stringTemplates.txt +++ b/compiler/testData/ir/irText/expressions/stringTemplates.txt @@ -2,7 +2,7 @@ FILE fqName: fileName:/stringTemplates.kt FUN name:foo visibility:public modality:FINAL <> () returnType:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='foo(): String' - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" PROPERTY name:x visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:x type:kotlin.Int visibility:public flags:final,static EXPRESSION_BODY @@ -15,7 +15,7 @@ FILE fqName: fileName:/stringTemplates.kt PROPERTY name:test1 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test1 type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:test1 visibility:public modality:FINAL flags:val BLOCK_BODY @@ -24,7 +24,7 @@ FILE fqName: fileName:/stringTemplates.kt PROPERTY name:test2 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test2 type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - CONST String type=kotlin.String value=abc + CONST String type=kotlin.String value="abc" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL flags:val BLOCK_BODY @@ -33,7 +33,7 @@ FILE fqName: fileName:/stringTemplates.kt PROPERTY name:test3 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test3 type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - CONST String type=kotlin.String value= + CONST String type=kotlin.String value="" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL flags:val BLOCK_BODY @@ -42,7 +42,7 @@ FILE fqName: fileName:/stringTemplates.kt PROPERTY name:test4 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test4 type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - CONST String type=kotlin.String value=abc + CONST String type=kotlin.String value="abc" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:test4 visibility:public modality:FINAL flags:val BLOCK_BODY @@ -51,12 +51,7 @@ FILE fqName: fileName:/stringTemplates.kt PROPERTY name:test5 visibility:public modality:FINAL flags:val FIELD PROPERTY_BACKING_FIELD name:test5 type:kotlin.String visibility:public flags:final,static EXPRESSION_BODY - STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value= - - CONST String type=kotlin.String value=abc - CONST String type=kotlin.String value= - + CONST String type=kotlin.String value="\nabc\n" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:test5 visibility:public modality:FINAL flags:val BLOCK_BODY @@ -67,7 +62,7 @@ FILE fqName: fileName:/stringTemplates.kt EXPRESSION_BODY STRING_CONCATENATION type=kotlin.String CALL '(): String' type=kotlin.String origin=GET_PROPERTY - CONST String type=kotlin.String value= + CONST String type=kotlin.String value=" " CALL 'foo(): String' type=kotlin.String origin=null FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.String flags: correspondingProperty: PROPERTY name:test6 visibility:public modality:FINAL flags:val @@ -104,4 +99,3 @@ FILE fqName: fileName:/stringTemplates.kt BLOCK_BODY RETURN type=kotlin.Nothing from='(): String' GET_FIELD 'test9: String' type=kotlin.String origin=null - diff --git a/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.txt b/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.txt index de9d1bf50f9..1c732091d51 100644 --- a/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.txt +++ b/compiler/testData/ir/irText/expressions/tryCatchWithImplicitCast.txt @@ -18,5 +18,4 @@ FILE fqName: fileName:/tryCatchWithImplicitCast.kt CATCH parameter=e: Throwable VAR CATCH_PARAMETER name:e type:kotlin.Throwable flags:val BLOCK type=kotlin.String origin=null - CONST String type=kotlin.String value= - + CONST String type=kotlin.String value="" diff --git a/compiler/testData/ir/irText/expressions/useImportedMember.txt b/compiler/testData/ir/irText/expressions/useImportedMember.txt index 0562c4c3c04..87952b489a6 100644 --- a/compiler/testData/ir/irText/expressions/useImportedMember.txt +++ b/compiler/testData/ir/irText/expressions/useImportedMember.txt @@ -169,17 +169,17 @@ FILE fqName: fileName:/useImportedMember.kt s: CONST Int type=kotlin.Int value=1 arg1: CONST Int type=kotlin.Int value=1 then: RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=1 + CONST String type=kotlin.String value="1" WHEN type=kotlin.Unit origin=null BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ arg0: CALL 'f(String): Int' type=kotlin.Int origin=null $this: GET_OBJECT 'C' type=C - s: CONST String type=kotlin.String value=s + s: CONST String type=kotlin.String value="s" arg1: CONST Int type=kotlin.Int value=2 then: RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=2 + CONST String type=kotlin.String value="2" WHEN type=kotlin.Unit origin=null BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -189,7 +189,7 @@ FILE fqName: fileName:/useImportedMember.kt $receiver: CONST Boolean type=kotlin.Boolean value=true arg1: CONST Int type=kotlin.Int value=3 then: RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=3 + CONST String type=kotlin.String value="3" WHEN type=kotlin.Unit origin=null BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -198,7 +198,7 @@ FILE fqName: fileName:/useImportedMember.kt $this: GET_OBJECT 'C' type=C arg1: CONST Int type=kotlin.Int value=4 then: RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=4 + CONST String type=kotlin.String value="4" CALL '(Int): Unit' type=kotlin.Unit origin=EQ $this: GET_OBJECT 'C' type=C : CONST Int type=kotlin.Int value=5 @@ -210,7 +210,7 @@ FILE fqName: fileName:/useImportedMember.kt $this: GET_OBJECT 'C' type=C arg1: CONST Int type=kotlin.Int value=5 then: RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=5 + CONST String type=kotlin.String value="5" WHEN type=kotlin.Unit origin=null BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -220,7 +220,7 @@ FILE fqName: fileName:/useImportedMember.kt $receiver: CONST Int type=kotlin.Int value=5 arg1: CONST Int type=kotlin.Int value=6 then: RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=6 + CONST String type=kotlin.String value="6" WHEN type=kotlin.Unit origin=null BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -228,10 +228,10 @@ FILE fqName: fileName:/useImportedMember.kt arg0: CALL 'g1(String): String' type=kotlin.String origin=null : kotlin.String $this: GET_OBJECT 'C' type=C - t: CONST String type=kotlin.String value=7 - arg1: CONST String type=kotlin.String value=7 + t: CONST String type=kotlin.String value="7" + arg1: CONST String type=kotlin.String value="7" then: RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=7 + CONST String type=kotlin.String value="7" WHEN type=kotlin.Unit origin=null BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -239,10 +239,10 @@ FILE fqName: fileName:/useImportedMember.kt arg0: CALL '() on String: String' type=kotlin.String origin=GET_PROPERTY <`0>: kotlin.String $this: GET_OBJECT 'C' type=C - $receiver: CONST String type=kotlin.String value=8 - arg1: CONST String type=kotlin.String value=8 + $receiver: CONST String type=kotlin.String value="8" + arg1: CONST String type=kotlin.String value="8" then: RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=8 + CONST String type=kotlin.String value="8" WHEN type=kotlin.Unit origin=null BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -253,7 +253,7 @@ FILE fqName: fileName:/useImportedMember.kt $receiver: CONST Int type=kotlin.Int value=9 arg1: CONST Int type=kotlin.Int value=9 then: RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=9 + CONST String type=kotlin.String value="9" WHEN type=kotlin.Unit origin=null BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ @@ -261,20 +261,19 @@ FILE fqName: fileName:/useImportedMember.kt arg0: CALL '() on String: String' type=kotlin.String origin=GET_PROPERTY <`0>: kotlin.String $this: GET_OBJECT 'C' type=C - $receiver: CONST String type=kotlin.String value=10 - arg1: CONST String type=kotlin.String value=10 + $receiver: CONST String type=kotlin.String value="10" + arg1: CONST String type=kotlin.String value="10" then: RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=10 + CONST String type=kotlin.String value="10" WHEN type=kotlin.Unit origin=null BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCLEQ arg0: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EXCLEQ arg0: CALL 'genericFromSuper(String): String' type=kotlin.String origin=null $this: GET_OBJECT 'C' type=C - g: CONST String type=kotlin.String value=11 - arg1: CONST String type=kotlin.String value=11 + g: CONST String type=kotlin.String value="11" + arg1: CONST String type=kotlin.String value="11" then: RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=11 + CONST String type=kotlin.String value="11" RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=OK - + CONST String type=kotlin.String value="OK" diff --git a/compiler/testData/ir/irText/expressions/vararg.txt b/compiler/testData/ir/irText/expressions/vararg.txt index f71e7cf3bac..92c2eeccfb7 100644 --- a/compiler/testData/ir/irText/expressions/vararg.txt +++ b/compiler/testData/ir/irText/expressions/vararg.txt @@ -15,9 +15,9 @@ FILE fqName: fileName:/vararg.kt CALL 'arrayOf(vararg String): Array' type=kotlin.Array origin=null : kotlin.String elements: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=1 - CONST String type=kotlin.String value=2 - CONST String type=kotlin.String value=3 + CONST String type=kotlin.String value="1" + CONST String type=kotlin.String value="2" + CONST String type=kotlin.String value="3" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Array flags: correspondingProperty: PROPERTY name:test2 visibility:public modality:FINAL flags:val BLOCK_BODY @@ -29,12 +29,12 @@ FILE fqName: fileName:/vararg.kt CALL 'arrayOf(vararg String): Array' type=kotlin.Array origin=null : kotlin.String elements: VARARG type=kotlin.Array varargElementType=kotlin.String - CONST String type=kotlin.String value=0 + CONST String type=kotlin.String value="0" SPREAD_ELEMENT CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY SPREAD_ELEMENT CALL '(): Array' type=kotlin.Array origin=GET_PROPERTY - CONST String type=kotlin.String value=4 + CONST String type=kotlin.String value="4" FUN DEFAULT_PROPERTY_ACCESSOR name: visibility:public modality:FINAL <> () returnType:kotlin.Array flags: correspondingProperty: PROPERTY name:test3 visibility:public modality:FINAL flags:val BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt index 36fe17fb4bb..5e09a3e6d7a 100644 --- a/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt +++ b/compiler/testData/ir/irText/expressions/variableAsFunctionCall.txt @@ -21,13 +21,13 @@ FILE fqName: fileName:/variableAsFunctionCall.kt RETURN type=kotlin.Nothing from='test2(String.() -> Unit): Unit' CALL 'invoke(String): Unit' type=kotlin.Unit origin=INVOKE $this: GET_VAR 'value-parameter f: String.() -> Unit' type=kotlin.String.() -> kotlin.Unit origin=VARIABLE_AS_FUNCTION - p1: CONST String type=kotlin.String value=hello + p1: CONST String type=kotlin.String value="hello" FUN name:test3 visibility:public modality:FINAL <> () returnType:kotlin.String flags: BLOCK_BODY RETURN type=kotlin.Nothing from='test3(): String' CALL 'invoke(): String' type=kotlin.String origin=null $this: CALL 'k() on String: () -> String' type=() -> kotlin.String origin=null - $receiver: CONST String type=kotlin.String value=hello + $receiver: CONST String type=kotlin.String value="hello" FUN name:test4 visibility:public modality:FINAL <> (ns:kotlin.String?) returnType:kotlin.String? flags: VALUE_PARAMETER name:ns index:0 type:kotlin.String? flags: BLOCK_BODY diff --git a/compiler/testData/ir/irText/expressions/when.txt b/compiler/testData/ir/irText/expressions/when.txt index 7abb99d7b35..cd63abf1bf2 100644 --- a/compiler/testData/ir/irText/expressions/when.txt +++ b/compiler/testData/ir/irText/expressions/when.txt @@ -30,23 +30,23 @@ FILE fqName: fileName:/when.kt if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST String type=kotlin.String value=null + then: CONST String type=kotlin.String value="null" BRANCH if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null arg1: GET_OBJECT 'A' type=A - then: CONST String type=kotlin.String value=A + then: CONST String type=kotlin.String value="A" BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:String modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable; kotlin.CharSequence; java.io.Serializable] GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null - then: CONST String type=kotlin.String value=String + then: CONST String type=kotlin.String value="String" BRANCH if: CALL 'NOT(Boolean): Boolean' type=kotlin.Boolean origin=EXCL arg0: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.Number typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Number modality:ABSTRACT visibility:public flags: superTypes:[kotlin.Any; java.io.Serializable] GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null - then: CONST String type=kotlin.String value=!Number + then: CONST String type=kotlin.String value="!Number" BRANCH if: CALL 'contains(Number) on Iterable: Boolean' type=kotlin.Boolean origin=IN : kotlin.Number @@ -55,10 +55,10 @@ FILE fqName: fileName:/when.kt element: TYPE_OP type=kotlin.Number origin=IMPLICIT_CAST typeOperand=kotlin.Number typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Number modality:ABSTRACT visibility:public flags: superTypes:[kotlin.Any; java.io.Serializable] GET_VAR 'tmp0_subject: Any?' type=kotlin.Any? origin=null - then: CONST String type=kotlin.String value=nothingness? + then: CONST String type=kotlin.String value="nothingness?" BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CONST String type=kotlin.String value=something + then: CONST String type=kotlin.String value="something" FUN name:test visibility:public modality:FINAL <> (x:kotlin.Any?) returnType:kotlin.String flags: VALUE_PARAMETER name:x index:0 type:kotlin.Any? flags: BLOCK_BODY @@ -68,22 +68,22 @@ FILE fqName: fileName:/when.kt if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null arg1: CONST Null type=kotlin.Nothing? value=null - then: CONST String type=kotlin.String value=null + then: CONST String type=kotlin.String value="null" BRANCH if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null arg1: GET_OBJECT 'A' type=A - then: CONST String type=kotlin.String value=A + then: CONST String type=kotlin.String value="A" BRANCH if: TYPE_OP type=kotlin.Boolean origin=INSTANCEOF typeOperand=kotlin.String typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:String modality:FINAL visibility:public flags: superTypes:[kotlin.Comparable; kotlin.CharSequence; java.io.Serializable] GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null - then: CONST String type=kotlin.String value=String + then: CONST String type=kotlin.String value="String" BRANCH if: TYPE_OP type=kotlin.Boolean origin=NOT_INSTANCEOF typeOperand=kotlin.Number typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Number modality:ABSTRACT visibility:public flags: superTypes:[kotlin.Any; java.io.Serializable] GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null - then: CONST String type=kotlin.String value=!Number + then: CONST String type=kotlin.String value="!Number" BRANCH if: CALL 'contains(Number) on Iterable: Boolean' type=kotlin.Boolean origin=IN : kotlin.Number @@ -92,10 +92,10 @@ FILE fqName: fileName:/when.kt element: TYPE_OP type=kotlin.Number origin=IMPLICIT_CAST typeOperand=kotlin.Number typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB CLASS name:Number modality:ABSTRACT visibility:public flags: superTypes:[kotlin.Any; java.io.Serializable] GET_VAR 'value-parameter x: Any?' type=kotlin.Any? origin=null - then: CONST String type=kotlin.String value=nothingness? + then: CONST String type=kotlin.String value="nothingness?" BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CONST String type=kotlin.String value=something + then: CONST String type=kotlin.String value="something" FUN name:testComma visibility:public modality:FINAL <> (x:kotlin.Int) returnType:kotlin.String flags: VALUE_PARAMETER name:x index:0 type:kotlin.Int flags: BLOCK_BODY @@ -132,7 +132,7 @@ FILE fqName: fileName:/when.kt then: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_subject: Int' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=4 - then: CONST String type=kotlin.String value=1234 + then: CONST String type=kotlin.String value="1234" BRANCH if: WHEN type=kotlin.Boolean origin=WHEN_COMMA BRANCH @@ -153,7 +153,7 @@ FILE fqName: fileName:/when.kt then: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_subject: Int' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=7 - then: CONST String type=kotlin.String value=567 + then: CONST String type=kotlin.String value="567" BRANCH if: WHEN type=kotlin.Boolean origin=WHEN_COMMA BRANCH @@ -166,8 +166,7 @@ FILE fqName: fileName:/when.kt then: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_subject: Int' type=kotlin.Int origin=null arg1: CONST Int type=kotlin.Int value=9 - then: CONST String type=kotlin.String value=89 + then: CONST String type=kotlin.String value="89" BRANCH if: CONST Boolean type=kotlin.Boolean value=true - then: CONST String type=kotlin.String value=? - + then: CONST String type=kotlin.String value="?" diff --git a/compiler/testData/ir/irText/expressions/whenReturn.txt b/compiler/testData/ir/irText/expressions/whenReturn.txt index 5a19f80b977..f665942cb24 100644 --- a/compiler/testData/ir/irText/expressions/whenReturn.txt +++ b/compiler/testData/ir/irText/expressions/whenReturn.txt @@ -9,31 +9,30 @@ FILE fqName: fileName:/whenReturn.kt BRANCH if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_subject: String' type=kotlin.String origin=null - arg1: CONST String type=kotlin.String value=A + arg1: CONST String type=kotlin.String value="A" then: RETURN type=kotlin.Nothing from='toString(String): String' - CONST String type=kotlin.String value=Excellent + CONST String type=kotlin.String value="Excellent" BRANCH if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_subject: String' type=kotlin.String origin=null - arg1: CONST String type=kotlin.String value=B + arg1: CONST String type=kotlin.String value="B" then: RETURN type=kotlin.Nothing from='toString(String): String' - CONST String type=kotlin.String value=Good + CONST String type=kotlin.String value="Good" BRANCH if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_subject: String' type=kotlin.String origin=null - arg1: CONST String type=kotlin.String value=C + arg1: CONST String type=kotlin.String value="C" then: RETURN type=kotlin.Nothing from='toString(String): String' - CONST String type=kotlin.String value=Mediocre + CONST String type=kotlin.String value="Mediocre" BRANCH if: CALL 'EQEQ(Any?, Any?): Boolean' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'tmp0_subject: String' type=kotlin.String origin=null - arg1: CONST String type=kotlin.String value=D + arg1: CONST String type=kotlin.String value="D" then: RETURN type=kotlin.Nothing from='toString(String): String' - CONST String type=kotlin.String value=Fair + CONST String type=kotlin.String value="Fair" BRANCH if: CONST Boolean type=kotlin.Boolean value=true then: RETURN type=kotlin.Nothing from='toString(String): String' - CONST String type=kotlin.String value=Failure + CONST String type=kotlin.String value="Failure" RETURN type=kotlin.Nothing from='toString(String): String' - CONST String type=kotlin.String value=??? - + CONST String type=kotlin.String value="???" diff --git a/compiler/testData/ir/irText/lambdas/destructuringInLambda.txt b/compiler/testData/ir/irText/lambdas/destructuringInLambda.txt index 274d22dd7ed..1a3609260d3 100644 --- a/compiler/testData/ir/irText/lambdas/destructuringInLambda.txt +++ b/compiler/testData/ir/irText/lambdas/destructuringInLambda.txt @@ -63,15 +63,15 @@ FILE fqName: fileName:/destructuringInLambda.kt BLOCK_BODY RETURN type=kotlin.Nothing from='toString(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=A( - CONST String type=kotlin.String value=x= + CONST String type=kotlin.String value="A(" + CONST String type=kotlin.String value="x=" CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'this@A: A' type=A origin=null - CONST String type=kotlin.String value=, - CONST String type=kotlin.String value=y= + CONST String type=kotlin.String value=", " + CONST String type=kotlin.String value="y=" CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY $this: GET_VAR 'this@A: A' type=A origin=null - CONST String type=kotlin.String value=) + CONST String type=kotlin.String value=")" FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:A) returnType:kotlin.Int flags: overridden: FUN IR_EXTERNAL_DECLARATION_STUB name:hashCode visibility:public modality:OPEN <> ($this:kotlin.Any) returnType:kotlin.Int flags: diff --git a/compiler/testData/ir/irText/lambdas/extensionLambda.txt b/compiler/testData/ir/irText/lambdas/extensionLambda.txt index 47718f2b92d..8701eda478b 100644 --- a/compiler/testData/ir/irText/lambdas/extensionLambda.txt +++ b/compiler/testData/ir/irText/lambdas/extensionLambda.txt @@ -5,7 +5,7 @@ FILE fqName: fileName:/extensionLambda.kt CALL 'run(String.() -> Int) on String: Int' type=kotlin.Int origin=null : kotlin.String : kotlin.Int - $receiver: CONST String type=kotlin.String value=42 + $receiver: CONST String type=kotlin.String value="42" block: BLOCK type=kotlin.String.() -> kotlin.Int origin=LAMBDA FUN LOCAL_FUNCTION_FOR_LAMBDA name: visibility:local modality:FINAL <> ($receiver:kotlin.String) returnType:kotlin.Int flags: $receiver: VALUE_PARAMETER name: type:kotlin.String flags: diff --git a/compiler/testData/ir/irText/lambdas/samAdapter.txt b/compiler/testData/ir/irText/lambdas/samAdapter.txt index a626b5a112a..029b29cdd98 100644 --- a/compiler/testData/ir/irText/lambdas/samAdapter.txt +++ b/compiler/testData/ir/irText/lambdas/samAdapter.txt @@ -8,7 +8,7 @@ FILE fqName: fileName:/samAdapter.kt BLOCK_BODY RETURN type=kotlin.Nothing from='(): Unit' CALL 'println(Any?): Unit' type=kotlin.Unit origin=null - message: CONST String type=kotlin.String value=Hello, world! + message: CONST String type=kotlin.String value="Hello, world!" FUNCTION_REFERENCE '(): Unit' type=() -> kotlin.Unit origin=LAMBDA CALL 'run(): Unit' type=kotlin.Unit origin=null $this: GET_VAR 'hello: Runnable' type=java.lang.Runnable origin=null diff --git a/compiler/testData/ir/irText/regressions/coercionInLoop.txt b/compiler/testData/ir/irText/regressions/coercionInLoop.txt index fc6e07aea43..8baa99d7e1a 100644 --- a/compiler/testData/ir/irText/regressions/coercionInLoop.txt +++ b/compiler/testData/ir/irText/regressions/coercionInLoop.txt @@ -24,7 +24,7 @@ FILE fqName: fileName:/coercionInLoop.kt $this: GET_VAR 'x: DoubleIterator' type=kotlin.collections.DoubleIterator origin=null then: RETURN type=kotlin.Nothing from='box(): String' STRING_CONCATENATION type=kotlin.String - CONST String type=kotlin.String value=Fail + CONST String type=kotlin.String value="Fail " GET_VAR 'i: Int' type=kotlin.Int origin=null TYPE_OP type=kotlin.Unit origin=IMPLICIT_COERCION_TO_UNIT typeOperand=kotlin.Unit typeOperand: CLASS IR_EXTERNAL_DECLARATION_STUB OBJECT name:Unit modality:FINAL visibility:public flags: superTypes:[kotlin.Any] @@ -36,5 +36,4 @@ FILE fqName: fileName:/coercionInLoop.kt $this: GET_VAR 'tmp0: Int' type=kotlin.Int origin=null GET_VAR 'tmp0: Int' type=kotlin.Int origin=null RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=OK - + CONST String type=kotlin.String value="OK" diff --git a/compiler/testData/ir/irText/regressions/newInference/fixationOrder1.txt b/compiler/testData/ir/irText/regressions/newInference/fixationOrder1.txt index df8c6fd375e..61f0f39b11a 100644 --- a/compiler/testData/ir/irText/regressions/newInference/fixationOrder1.txt +++ b/compiler/testData/ir/irText/regressions/newInference/fixationOrder1.txt @@ -37,7 +37,7 @@ FILE fqName: fileName:/fixationOrder1.kt CALL 'check(String, Int, (String) -> Int): Inv2' type=Inv2 origin=null : kotlin.String : kotlin.Int - x: CONST String type=kotlin.String value= + x: CONST String type=kotlin.String value="" y: CONST Int type=kotlin.Int value=1 f: CALL 'foo(): (String) -> Int' type=(kotlin.String) -> kotlin.Int origin=null : kotlin.String @@ -47,5 +47,4 @@ FILE fqName: fileName:/fixationOrder1.kt VAR name:x type:Inv2 flags:val CALL 'test(): Inv2' type=Inv2 origin=null RETURN type=kotlin.Nothing from='box(): String' - CONST String type=kotlin.String value=OK - + CONST String type=kotlin.String value="OK" diff --git a/compiler/testData/ir/sourceRanges/synthesizedDataClassMembers.txt b/compiler/testData/ir/sourceRanges/synthesizedDataClassMembers.txt index 823e1532e96..5f52fb54662 100644 --- a/compiler/testData/ir/sourceRanges/synthesizedDataClassMembers.txt +++ b/compiler/testData/ir/sourceRanges/synthesizedDataClassMembers.txt @@ -81,19 +81,19 @@ @0:0..4:1 BLOCK_BODY @0:0..4:1 RETURN type=kotlin.Nothing from='toString(): String' @0:0..4:1 STRING_CONCATENATION type=kotlin.String - @0:0..4:1 CONST String type=kotlin.String value=C( - @0:0..4:1 CONST String type=kotlin.String value=x= + @0:0..4:1 CONST String type=kotlin.String value="C(" + @0:0..4:1 CONST String type=kotlin.String value="x=" @0:0..4:1 CALL '(): Int' type=kotlin.Int origin=GET_PROPERTY @0:0..4:1 GET_VAR 'this@C: C' type=C origin=null - @0:0..4:1 CONST String type=kotlin.String value=, - @0:0..4:1 CONST String type=kotlin.String value=y= + @0:0..4:1 CONST String type=kotlin.String value=", " + @0:0..4:1 CONST String type=kotlin.String value="y=" @0:0..4:1 CALL '(): String' type=kotlin.String origin=GET_PROPERTY @0:0..4:1 GET_VAR 'this@C: C' type=C origin=null - @0:0..4:1 CONST String type=kotlin.String value=, - @0:0..4:1 CONST String type=kotlin.String value=z= + @0:0..4:1 CONST String type=kotlin.String value=", " + @0:0..4:1 CONST String type=kotlin.String value="z=" @0:0..4:1 CALL '(): Any' type=kotlin.Any origin=GET_PROPERTY @0:0..4:1 GET_VAR 'this@C: C' type=C origin=null - @0:0..4:1 CONST String type=kotlin.String value=) + @0:0..4:1 CONST String type=kotlin.String value=")" @0:0..4:1 FUN GENERATED_DATA_CLASS_MEMBER name:hashCode visibility:public modality:OPEN <> ($this:C) returnType:kotlin.Int flags: @-1:-1..-1 VALUE_PARAMETER name: type:C flags: @0:0..4:1 BLOCK_BODY diff --git a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java index def9ec3d30b..8bbcecca3f7 100644 --- a/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/ir/IrTextTestCaseGenerated.java @@ -947,6 +947,11 @@ public class IrTextTestCaseGenerated extends AbstractIrTextTestCase { runTest("compiler/testData/ir/irText/expressions/kt23030.kt"); } + @TestMetadata("kt28006.kt") + public void testKt28006() throws Exception { + runTest("compiler/testData/ir/irText/expressions/kt28006.kt"); + } + @TestMetadata("lambdaInCAO.kt") public void testLambdaInCAO() throws Exception { runTest("compiler/testData/ir/irText/expressions/lambdaInCAO.kt");