From 8715bd6189b9712e82dbc774cf5268995afcfe87 Mon Sep 17 00:00:00 2001 From: Ivan Kylchik Date: Tue, 14 Nov 2023 13:06:51 +0100 Subject: [PATCH] [IR] Don't evaluate expressions in inner class of an annotation --- .../LLFirBlackBoxCodegenBasedTestGenerated.java | 6 ++++++ ...irReversedBlackBoxCodegenBasedTestGenerated.java | 6 ++++++ .../FirLightTreeBlackBoxCodegenTestGenerated.java | 6 ++++++ ...genWithIrFakeOverrideGeneratorTestGenerated.java | 6 ++++++ .../codegen/FirPsiBlackBoxCodegenTestGenerated.java | 6 ++++++ .../transformer/IrConstExpressionTransformer.kt | 13 +++++-------- .../annotationClassWithInner.kt | 11 +++++++++++ .../codegen/BlackBoxCodegenTestGenerated.java | 6 ++++++ .../codegen/IrBlackBoxCodegenTestGenerated.java | 6 ++++++ ...IrBlackBoxCodegenWithIrInlinerTestGenerated.java | 6 ++++++ .../codegen/LightAnalysisModeTestGenerated.java | 5 +++++ .../js/test/fir/FirJsCodegenBoxTestGenerated.java | 6 ++++++ .../test/fir/FirJsES6CodegenBoxTestGenerated.java | 6 ++++++ .../js/test/ir/IrJsCodegenBoxTestGenerated.java | 6 ++++++ .../js/test/ir/IrJsES6CodegenBoxTestGenerated.java | 6 ++++++ .../blackbox/FirNativeCodegenBoxTestGenerated.java | 6 ++++++ .../FirNativeCodegenBoxTestNoPLGenerated.java | 6 ++++++ .../blackbox/NativeCodegenBoxTestGenerated.java | 6 ++++++ .../blackbox/NativeCodegenBoxTestNoPLGenerated.java | 6 ++++++ .../wasm/test/FirWasmCodegenBoxTestGenerated.java | 6 ++++++ .../wasm/test/K1WasmCodegenBoxTestGenerated.java | 6 ++++++ 21 files changed, 129 insertions(+), 8 deletions(-) create mode 100644 compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java index 3d8aeb7a868..ca46e0249f1 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirBlackBoxCodegenBasedTestGenerated.java @@ -29636,6 +29636,12 @@ public class LLFirBlackBoxCodegenBasedTestGenerated extends AbstractLLFirBlackBo KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java index e618c63b8e9..da2c62db41b 100644 --- a/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java +++ b/analysis/low-level-api-fir/tests/org/jetbrains/kotlin/analysis/low/level/api/fir/diagnostic/compiler/based/LLFirReversedBlackBoxCodegenBasedTestGenerated.java @@ -29636,6 +29636,12 @@ public class LLFirReversedBlackBoxCodegenBasedTestGenerated extends AbstractLLFi KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java index 4b96967a5b9..68526944980 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenTestGenerated.java @@ -29289,6 +29289,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java index 81e6156c1da..e6a3b38456a 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated.java @@ -29289,6 +29289,12 @@ public class FirLightTreeBlackBoxCodegenWithIrFakeOverrideGeneratorTestGenerated KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java index d3e701a676a..860964d1ccc 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirPsiBlackBoxCodegenTestGenerated.java @@ -29289,6 +29289,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/transformer/IrConstExpressionTransformer.kt b/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/transformer/IrConstExpressionTransformer.kt index 5e06fd4cb1b..5cc42066014 100644 --- a/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/transformer/IrConstExpressionTransformer.kt +++ b/compiler/ir/ir.interpreter/src/org/jetbrains/kotlin/ir/interpreter/transformer/IrConstExpressionTransformer.kt @@ -18,6 +18,7 @@ import org.jetbrains.kotlin.ir.interpreter.IrInterpreter import org.jetbrains.kotlin.ir.interpreter.checker.EvaluationMode import org.jetbrains.kotlin.ir.interpreter.checker.IrInterpreterChecker import org.jetbrains.kotlin.ir.interpreter.createGetField +import org.jetbrains.kotlin.ir.util.parentClassOrNull import kotlin.math.max import kotlin.math.min @@ -35,16 +36,12 @@ internal abstract class IrConstExpressionTransformer( interpreter, irFile, mode, checker, evaluatedConstTracker, inlineConstTracker, onWarning, onError, suppressExceptions ) { override fun visitFunction(declaration: IrFunction, data: Data): IrStatement { - // It is useless to visit default accessor and if we do that we could render excess information for `IrGetField` + // It is useless to visit default accessor, and if we do that, we could render excess information for `IrGetField` if (declaration.origin == IrDeclarationOrigin.DEFAULT_PROPERTY_ACCESSOR) return declaration - return super.visitFunction(declaration, data) - } - override fun visitClass(declaration: IrClass, data: Data): IrStatement { - if (declaration.kind == ClassKind.ANNOTATION_CLASS) { - return super.visitClass(declaration, data.copy(inConstantExpression = true)) - } - return super.visitClass(declaration, data) + // We want to be able to evaluate default arguments of annotation's constructor + val isAnnotationConstructor = declaration is IrConstructor && declaration.parentClassOrNull?.kind == ClassKind.ANNOTATION_CLASS + return super.visitFunction(declaration, data.copy(inConstantExpression = isAnnotationConstructor)) } override fun visitCall(expression: IrCall, data: Data): IrElement { diff --git a/compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt b/compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt new file mode 100644 index 00000000000..0e0547fd4d0 --- /dev/null +++ b/compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt @@ -0,0 +1,11 @@ +val a = "OK" + +annotation class Anno { + class Inner { + val shouldNotBeEvaluated = a + } +} + +fun box(): String { + return Anno.Inner().shouldNotBeEvaluated +} diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java index ccaa52fec54..e4c2292fde7 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java @@ -27987,6 +27987,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("kt55866.kt") public void testKt55866() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java index d517a4c859f..d41fc8ef676 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java @@ -29289,6 +29289,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java index 0b38e398a32..d5532e78f87 100644 --- a/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java +++ b/compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenWithIrInlinerTestGenerated.java @@ -29289,6 +29289,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 92e5ea95baa..9ee0f9ec9e8 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -24755,6 +24755,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { runTest("compiler/testData/codegen/box/involvesIrInterpreter/booleanOperations.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java index b999d20a43a..0bf030f8758 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsCodegenBoxTestGenerated.java @@ -21681,6 +21681,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java index b9da418fafa..e2187c8a620 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/fir/FirJsES6CodegenBoxTestGenerated.java @@ -21681,6 +21681,12 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java index 222a56de8b8..1b02fa1e74e 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsCodegenBoxTestGenerated.java @@ -21681,6 +21681,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java index a5be9ad99d5..84e1c2d8477 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/IrJsES6CodegenBoxTestGenerated.java @@ -21681,6 +21681,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java index 7c478d0a937..45295e172ea 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestGenerated.java @@ -24788,6 +24788,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java index 2afdb981ada..5e9d8c0a097 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/FirNativeCodegenBoxTestNoPLGenerated.java @@ -25276,6 +25276,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java index 9fd3ad937be..165151af102 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestGenerated.java @@ -24300,6 +24300,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java index 2449266d960..8f0354931ff 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/test/blackbox/NativeCodegenBoxTestNoPLGenerated.java @@ -24789,6 +24789,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("booleanOperations.kt") public void testBooleanOperations() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java index 26ebaff2d4d..e8820d8a9ab 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/FirWasmCodegenBoxTestGenerated.java @@ -21705,6 +21705,12 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("kt55912.kt") public void testKt55912() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java index 2c5f48fc796..8ca50186ab3 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/K1WasmCodegenBoxTestGenerated.java @@ -21705,6 +21705,12 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/involvesIrInterpreter"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @Test + @TestMetadata("annotationClassWithInner.kt") + public void testAnnotationClassWithInner() throws Exception { + runTest("compiler/testData/codegen/box/involvesIrInterpreter/annotationClassWithInner.kt"); + } + @Test @TestMetadata("kt55912.kt") public void testKt55912() throws Exception {