diff --git a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/evaluate/IrConstTransformer.kt b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/evaluate/IrConstTransformer.kt index db3bdab328d..ac6b310d338 100644 --- a/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/evaluate/IrConstTransformer.kt +++ b/compiler/fir/fir2ir/src/org/jetbrains/kotlin/fir/backend/evaluate/IrConstTransformer.kt @@ -33,7 +33,7 @@ class IrConstTransformer(private val interpreter: IrInterpreter, private val irF if (expression.accept(IrCompileTimeChecker(mode = EvaluationMode.ONLY_BUILTINS), null)) { return interpreter.interpret(expression, irFile).replaceIfError(expression) } - return expression + return super.visitCall(expression) } override fun visitField(declaration: IrField): IrStatement { diff --git a/compiler/testData/codegen/box/fir/complexAnnotations.kt b/compiler/testData/codegen/box/fir/complexAnnotations.kt index 0831cde6c48..ccff1dba1f3 100644 --- a/compiler/testData/codegen/box/fir/complexAnnotations.kt +++ b/compiler/testData/codegen/box/fir/complexAnnotations.kt @@ -55,5 +55,10 @@ fun box(): String { Some() Other() Another() + run { + @State(name = "A", storages = [(Storage(value = StoragePathMacros.NON_ROAMABLE_FILE))]) + class Local + Local() + } return "OK" } diff --git a/compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt b/compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt index 39d32f49641..0b4f71083cd 100644 --- a/compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt +++ b/compiler/testData/codegen/bytecodeText/constProperty/noInlineInCmp.kt @@ -1,4 +1,6 @@ // !LANGUAGE: -InlineConstVals +// IGNORE_BACKEND_FIR: JVM_IR +// FIR status: don't support legacy feature const val z = 0 diff --git a/compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt b/compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt index f52ff9efb75..a90b754a68b 100644 --- a/compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt +++ b/compiler/testData/codegen/bytecodeText/lazyCodegen/negateConstantCompare.kt @@ -1,4 +1,6 @@ // !LANGUAGE: -InlineConstVals +// IGNORE_BACKEND_FIR: JVM_IR +// FIR status: don't support legacy feature const val one = 1 const val two = 2 diff --git a/compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt b/compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt index e44503c1d45..45dd3192a8b 100644 --- a/compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt +++ b/compiler/testData/codegen/bytecodeText/whenStringOptimization/nonInlinedConst.kt @@ -1,4 +1,6 @@ // !LANGUAGE: -InlineConstVals +// IGNORE_BACKEND_FIR: JVM_IR +// FIR status: don't support legacy feature const val y = "cde" diff --git a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.ir.txt b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.ir.txt index 8f8947feb36..530f1c18fc2 100644 --- a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.ir.txt @@ -398,8 +398,7 @@ FILE fqName: fileName:/ArrayMap.kt : T of .ArrayMapImpl data: CALL 'public final fun arrayOfNulls (size: kotlin.Int): kotlin.Array declared in kotlin' type=kotlin.Array origin=null : kotlin.Any - size: CALL 'private final fun (): kotlin.Int declared in .ArrayMapImpl.Companion' type=kotlin.Int origin=GET_PROPERTY - $this: GET_OBJECT 'CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]' type=.ArrayMapImpl.Companion + size: CONST Int type=kotlin.Int value=20 PROPERTY name:size visibility:public modality:FINAL [var] overridden: public abstract size: kotlin.Int [val] @@ -445,8 +444,7 @@ FILE fqName: fileName:/ArrayMap.kt $this: CALL 'public final fun (): kotlin.Int declared in kotlin.Array' type=kotlin.Int origin=GET_PROPERTY $this: CALL 'private final fun (): kotlin.Array declared in .ArrayMapImpl' type=kotlin.Array origin=GET_PROPERTY $this: GET_VAR ': .ArrayMapImpl.ArrayMapImpl> declared in .ArrayMapImpl.ensureCapacity' type=.ArrayMapImpl.ArrayMapImpl> origin=null - other: CALL 'private final fun (): kotlin.Int declared in .ArrayMapImpl.Companion' type=kotlin.Int origin=GET_PROPERTY - $this: GET_OBJECT 'CLASS OBJECT name:Companion modality:FINAL visibility:public [companion] superTypes:[kotlin.Any]' type=.ArrayMapImpl.Companion + other: CONST Int type=kotlin.Int value=2 FUN name:set visibility:public modality:FINAL <> ($this:.ArrayMapImpl.ArrayMapImpl>, index:kotlin.Int, value:T of .ArrayMapImpl) returnType:kotlin.Unit [operator] overridden: public abstract fun set (index: kotlin.Int, value: T of .ArrayMap): kotlin.Unit [operator] declared in .ArrayMap diff --git a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt index 6d1767f1fcb..13c84028162 100644 --- a/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/ArrayMap.fir.kt.txt @@ -172,7 +172,7 @@ internal class ArrayMapImpl : ArrayMap { } constructor() { - this/*ArrayMapImpl*/(data = arrayOfNulls(size = Companion.())) + this/*ArrayMapImpl*/(data = arrayOfNulls(size = 20)) } override var size: Int @@ -183,7 +183,7 @@ internal class ArrayMapImpl : ArrayMap { private fun ensureCapacity(index: Int) { when { lessOrEqual(arg0 = .().(), arg1 = index) -> { // BLOCK - .( = .().copyOf(newSize = .().().times(other = Companion.()))) + .( = .().copyOf(newSize = .().().times(other = 2))) } } } diff --git a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.ir.txt b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.ir.txt index dbf6792aed8..d0d54761234 100644 --- a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.ir.txt +++ b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.ir.txt @@ -64,7 +64,7 @@ FILE fqName: fileName:/coercionToUnitForNestedWhen.kt BRANCH if: CALL 'public final fun EQEQ (arg0: kotlin.Any?, arg1: kotlin.Any?): kotlin.Boolean declared in kotlin.internal.ir' type=kotlin.Boolean origin=EQEQ arg0: GET_VAR 'var ch: kotlin.Char? [var] declared in .consumeRestOfQuotedSequence' type=kotlin.Char? origin=null - arg1: CALL 'private final fun (): kotlin.Char declared in ' type=kotlin.Char origin=GET_PROPERTY + arg1: CONST Char type=kotlin.Char value='\\' then: BLOCK type=@[FlexibleNullability] java.lang.StringBuilder? origin=SAFE_CALL VAR IR_TEMPORARY_VARIABLE name:tmp_1 type:kotlin.Char? [val] CALL 'private final fun nextChar (): kotlin.Char? declared in ' type=kotlin.Char? origin=null diff --git a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.kt.txt b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.kt.txt index 227d6f6bedb..170f540c55c 100644 --- a/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.kt.txt +++ b/compiler/testData/ir/irText/firProblems/coercionToUnitForNestedWhen.fir.kt.txt @@ -22,7 +22,7 @@ fun Reader.consumeRestOfQuotedSequence(sb: StringBuilder, quote: Char) { else -> false }) { // BLOCK when { - EQEQ(arg0 = ch, arg1 = ()) -> { // BLOCK + EQEQ(arg0 = ch, arg1 = '\\') -> { // BLOCK val tmp1_safe_receiver: Char? = .nextChar() when { EQEQ(arg0 = tmp1_safe_receiver, arg1 = null) -> null