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 41a04b0873f..36c80152014 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 @@ -33811,6 +33811,12 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @Test @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() 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 dc852fb8819..5334a4e7192 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 @@ -33811,6 +33811,12 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @Test @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() throws Exception { diff --git a/compiler/resolution.common/src/org/jetbrains/kotlin/types/AbstractTypeApproximator.kt b/compiler/resolution.common/src/org/jetbrains/kotlin/types/AbstractTypeApproximator.kt index a64ffcb50a6..135323d437b 100644 --- a/compiler/resolution.common/src/org/jetbrains/kotlin/types/AbstractTypeApproximator.kt +++ b/compiler/resolution.common/src/org/jetbrains/kotlin/types/AbstractTypeApproximator.kt @@ -168,7 +168,12 @@ abstract class AbstractTypeApproximator( } } - private fun approximateLocalTypes(type: SimpleTypeMarker, conf: TypeApproximatorConfiguration, toSuper: Boolean): SimpleTypeMarker? { + private fun approximateLocalTypes( + type: SimpleTypeMarker, + conf: TypeApproximatorConfiguration, + toSuper: Boolean, + depth: Int + ): SimpleTypeMarker? { if (!toSuper) return null if (!conf.localTypes && !conf.anonymous) return null val constructor = type.typeConstructor() @@ -179,8 +184,28 @@ abstract class AbstractTypeApproximator( errorTypesEqualToAnything = false, stubTypesEqualToAnything = false ) - return AbstractTypeChecker.findCorrespondingSupertypes(typeCheckerContext, type, superConstructor).firstOrNull() + val result = AbstractTypeChecker.findCorrespondingSupertypes(typeCheckerContext, type, superConstructor) + .firstOrNull() ?.withNullability(type.isMarkedNullable()) + ?: return null + /* + * AbstractTypeChecker captures any projections in the super type by default, which may lead to the situation, when some local + * type with projection is approximated to some public type with captured (from subtyping) type argument (which is obviously + * incorrect) + * + * interface Invariant + * private fun Invariant.privateFunc() = object : Invariant {} + * + * fun Invariant.publicFunc() = privateFunc() + * + * Here type of `privateFunc()` is _anonymous_, and `findCorrespondingSupertypes` for it and `Invariant` as type + * constructor returns `Invariant` + */ + return if (ctx.isK2) { + (approximateTo(result, TypeApproximatorConfiguration.SubtypeCapturedTypesApproximation, toSuper, depth) ?: result) as SimpleTypeMarker? + } else { + result + } } private fun isIntersectionTypeEffectivelyNothing(constructor: IntersectionTypeConstructorMarker): Boolean { @@ -365,7 +390,7 @@ abstract class AbstractTypeApproximator( } } - return approximateLocalTypes(type, conf, toSuper) // simple classifier type + return approximateLocalTypes(type, conf, toSuper, depth) // simple classifier type } private fun approximateDefinitelyNotNullType( @@ -572,11 +597,11 @@ abstract class AbstractTypeApproximator( } } - if (newArguments.all { it == null }) return approximateLocalTypes(type, conf, toSuper) + if (newArguments.all { it == null }) return approximateLocalTypes(type, conf, toSuper, depth) val newArgumentsList = List(type.argumentsCount()) { index -> newArguments[index] ?: type.getArgument(index) } val approximatedType = type.replaceArguments(newArgumentsList) - return approximateLocalTypes(approximatedType, conf, toSuper) ?: approximatedType + return approximateLocalTypes(approximatedType, conf, toSuper, depth) ?: approximatedType } private fun shouldUseSubTypeForCapturedArgument( diff --git a/compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt b/compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt new file mode 100644 index 00000000000..e19a3971885 --- /dev/null +++ b/compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt @@ -0,0 +1,9 @@ +// ISSUE: KT-57222 + +interface Invariant + +fun Invariant.publicFunc() = privateFunc() + +private fun Invariant.privateFunc() = object : Invariant {} + +fun box() = "OK" 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 6868870a6a4..b1723907ae3 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 @@ -32311,6 +32311,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @Test + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @Test @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() 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 224c91d044b..4b458501342 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 @@ -33811,6 +33811,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @Test @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() 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 1059e03fd79..ae2e440fa3b 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 @@ -33811,6 +33811,12 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true); } + @Test + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @Test @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() 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 011a9db718d..1f6dbcd255d 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -27586,6 +27586,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true); } + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() throws Exception { runTest("compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt"); diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java index 5a2a5472f96..ab0d4b400c2 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/JsCodegenBoxTestGenerated.java @@ -23629,6 +23629,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS, true); } + @Test + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @Test @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() throws Exception { 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 4e137677a25..3c19a69267f 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 @@ -23767,6 +23767,12 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @Test + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @Test @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() 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 0bd3c954464..665e12c3f91 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 @@ -23767,6 +23767,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true); } + @Test + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @Test @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() 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 28db62735e4..65408893f59 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 @@ -23767,6 +23767,12 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true); } + @Test + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @Test @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java index 22cac02ecb2..fa0ee6ebd5b 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestGenerated.java @@ -27189,6 +27189,12 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @Test @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java index 8ff3af8cc2f..3ac0334257b 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/FirNativeCodegenBoxTestNoPLGenerated.java @@ -27811,6 +27811,12 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @Test @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java index d56245d6336..9f1852c0a90 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestGenerated.java @@ -26878,6 +26878,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @Test @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() throws Exception { diff --git a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java index 2d760fe2d3f..252beea10c6 100644 --- a/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java +++ b/native/native.tests/tests-gen/org/jetbrains/kotlin/konan/blackboxtest/NativeCodegenBoxTestNoPLGenerated.java @@ -27500,6 +27500,12 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true); } + @Test + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @Test @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() throws Exception { diff --git a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java index 52d3c210363..5a2f36fd92a 100644 --- a/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java +++ b/wasm/wasm.tests/tests-gen/org/jetbrains/kotlin/wasm/test/IrCodegenBoxWasmTestGenerated.java @@ -21164,6 +21164,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/objects"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true); } + @TestMetadata("anonymousObjectAndContrvariantProjection.kt") + public void testAnonymousObjectAndContrvariantProjection() throws Exception { + runTest("compiler/testData/codegen/box/objects/anonymousObjectAndContrvariantProjection.kt"); + } + @TestMetadata("anonymousObjectPropertyInitialization.kt") public void testAnonymousObjectPropertyInitialization() throws Exception { runTest("compiler/testData/codegen/box/objects/anonymousObjectPropertyInitialization.kt");