diff --git a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java index 4888ecd68a5..ae37e8d1063 100644 --- a/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java @@ -19579,6 +19579,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boundCallableReferencePassedToInlineFunctionGeneric2.kt") + public void testBoundCallableReferencePassedToInlineFunctionGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxImplDoesNotExecuteInSecondaryConstructor.kt") public void testBoxImplDoesNotExecuteInSecondaryConstructor() throws Exception { @@ -19615,6 +19621,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableForFakeOverrideGeneric2.kt") + public void testBoxNullableForFakeOverrideGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingType() throws Exception { @@ -19627,6 +19639,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingType() throws Exception { @@ -19639,6 +19657,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxResultInlineClassOfConstructorCall.kt") public void testBoxResultInlineClassOfConstructorCall() throws Exception { @@ -19651,6 +19675,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxResultInlineClassOfConstructorCallGeneric2.kt") + public void testBoxResultInlineClassOfConstructorCallGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxUnboxInlineClassesWithOperatorsGetSet.kt") public void testBoxUnboxInlineClassesWithOperatorsGetSet() throws Exception { @@ -19699,6 +19729,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("bridgeGenerationWithInlineClassOverAnyGeneric2.kt") + public void testBridgeGenerationWithInlineClassOverAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("bridgesWhenInlineClassImplementsGenericInterface.kt") public void testBridgesWhenInlineClassImplementsGenericInterface() throws Exception { @@ -19921,6 +19957,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("checkUnboxingResultFromTypeVariableGeneric2.kt") + public void testCheckUnboxingResultFromTypeVariableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("classInInlineClassInit.kt") public void testClassInInlineClassInit() throws Exception { @@ -20023,6 +20065,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("crossinlineWithInlineClassInParameterGeneric2.kt") + public void testCrossinlineWithInlineClassInParameterGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("customIterator.kt") public void testCustomIterator() throws Exception { @@ -20149,6 +20197,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("equalityChecksNegatedNullableGeneric2.kt") + public void testEqualityChecksNegatedNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("equalityChecksNegatedPrimitive.kt") public void testEqualityChecksNegatedPrimitive() throws Exception { @@ -20185,6 +20239,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("equalityChecksNullableGeneric2.kt") + public void testEqualityChecksNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("equalityChecksPrimitive.kt") public void testEqualityChecksPrimitive() throws Exception { @@ -20257,6 +20317,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("equalsEvaluationOrderNullableGeneric2.kt") + public void testEqualsEvaluationOrderNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("equalsEvaluationOrderPrimitive.kt") public void testEqualsEvaluationOrderPrimitive() throws Exception { @@ -20851,6 +20917,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("kt27096_nullablePrimitiveGeneric2.kt") + public void testKt27096_nullablePrimitiveGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("kt27096_nullableReference.kt") public void testKt27096_nullableReference() throws Exception { @@ -20863,6 +20935,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("kt27096_nullableReferenceGeneric2.kt") + public void testKt27096_nullableReferenceGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("kt27096_primitive.kt") public void testKt27096_primitive() throws Exception { @@ -21085,6 +21163,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/kt44701_jvmOverloadsGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("kt44701_jvmOverloadsGeneric2.kt") + public void testKt44701_jvmOverloadsGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt44701_jvmOverloadsGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("kt44867.kt") public void testKt44867() throws Exception { @@ -21295,6 +21379,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("nullableWrapperEqualityGeneric2.kt") + public void testNullableWrapperEqualityGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("overrideReturnNothing.kt") public void testOverrideReturnNothing() throws Exception { @@ -21415,6 +21505,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("resultGeneric2.kt") + public void testResultGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("resultInlining.kt") public void testResultInlining() throws Exception { @@ -21691,6 +21787,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("unboxValueOfAnyBeforeMethodInvocationGeneric2.kt") + public void testUnboxValueOfAnyBeforeMethodInvocationGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("useInlineClassesInsideElvisOperator.kt") public void testUseInlineClassesInsideElvisOperator() throws Exception { @@ -21808,6 +21910,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableAnyGeneric2.kt") + public void testBoxNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableAnyNull.kt") public void testBoxNullableAnyNull() throws Exception { @@ -21820,6 +21928,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableAnyNullGeneric2.kt") + public void testBoxNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableInt.kt") public void testBoxNullableInt() throws Exception { @@ -21832,6 +21946,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableIntGeneric2.kt") + public void testBoxNullableIntGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableIntNull.kt") public void testBoxNullableIntNull() throws Exception { @@ -21844,6 +21964,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableIntNullGeneric2.kt") + public void testBoxNullableIntNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableString.kt") public void testBoxNullableString() throws Exception { @@ -21856,6 +21982,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableStringGeneric2.kt") + public void testBoxNullableStringGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableStringNull.kt") public void testBoxNullableStringNull() throws Exception { @@ -21868,6 +22000,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableStringNullGeneric2.kt") + public void testBoxNullableStringNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxString.kt") public void testBoxString() throws Exception { @@ -21938,6 +22076,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("covariantOverrideChainErasedToNullableAnyGeneric2.kt") + public void testCovariantOverrideChainErasedToNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("covariantOverrideErasedToAny.kt") public void testCovariantOverrideErasedToAny() throws Exception { @@ -22046,6 +22190,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("kt28483Generic2.kt") + public void testKt28483Generic2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("kt31585.kt") public void testKt31585() throws Exception { @@ -22107,9 +22257,27 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT } @Test - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } @Test @@ -22118,12 +22286,6 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNull.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } - @Test - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); - } - @Test @TestMetadata("overrideNullableInlineClassWithNonNullAny.kt") public void testOverrideNullableInlineClassWithNonNullAny() throws Exception { @@ -22148,6 +22310,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNull.kt") public void testOverrideNullableInlineClassWithNonNullNullableAnyNull() throws Exception { @@ -22160,6 +22328,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("relatedReturnTypes1a.kt") public void testRelatedReturnTypes1a() throws Exception { @@ -22515,6 +22689,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("int.kt") public void testInt() throws Exception { @@ -22539,6 +22719,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("intNGeneric2.kt") + public void testIntNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("null.kt") public void testNull() throws Exception { @@ -22580,6 +22766,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT public void testStringNGeneric() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + + @Test + @TestMetadata("stringNGeneric2.kt") + public void testStringNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } } } @@ -23188,6 +23380,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("argumentICGeneric2.kt") + public void testArgumentICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("argumentResult.kt") public void testArgumentResult() throws Exception { @@ -23242,6 +23440,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("returnICGeneric2.kt") + public void testReturnICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("returnResult.kt") public void testReturnResult() throws Exception { @@ -23514,6 +23718,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt"); } + @Test + @TestMetadata("simple2.kt") + public void testSimple2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt"); + } + @Test @TestMetadata("upperBound.kt") public void testUpperBound() throws Exception { @@ -24475,6 +24685,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { @@ -24581,6 +24797,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { @@ -24687,6 +24909,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { diff --git a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBasedDescriptors.kt b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBasedDescriptors.kt index 01843624f97..9debc9f49d7 100644 --- a/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBasedDescriptors.kt +++ b/compiler/ir/ir.tree/src/org/jetbrains/kotlin/ir/descriptors/IrBasedDescriptors.kt @@ -30,6 +30,7 @@ import org.jetbrains.kotlin.serialization.deserialization.descriptors.Deserializ import org.jetbrains.kotlin.storage.LockBasedStorageManager import org.jetbrains.kotlin.storage.StorageManager import org.jetbrains.kotlin.types.* +import org.jetbrains.kotlin.types.typeUtil.makeNullable /* Descriptors that serve purely as a view into IR structures. Created each time at the borderline between IR-based and descriptor-based code (such as inliner). @@ -1149,7 +1150,8 @@ private fun makeKotlinType( hasQuestionMark: Boolean ): SimpleType = when (classifier) { - is IrTypeParameterSymbol -> classifier.toIrBasedDescriptorIfPossible().defaultType + is IrTypeParameterSymbol -> + classifier.toIrBasedDescriptorIfPossible().defaultType.makeNullableAsSpecified(hasQuestionMark) is IrClassSymbol -> { val classDescriptor = classifier.toIrBasedDescriptorIfPossible() val kotlinTypeArguments = arguments.mapIndexed { index, it -> diff --git a/compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric2.kt new file mode 100644 index 00000000000..aaa01a6c8cf --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric2.kt @@ -0,0 +1,71 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// IGNORE_BACKEND: JVM +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class IcInt(val i: T) { + fun simple(): String = i.toString() +} + +OPTIONAL_JVM_INLINE_ANNOTATION +value class IcLong(val l: T) { + fun simple(): String = l.toString() +} + +OPTIONAL_JVM_INLINE_ANNOTATION +value class IcAny(val a: T?) { + fun simple(): String = a?.toString() ?: "null" +} + +OPTIONAL_JVM_INLINE_ANNOTATION +value class IcOverIc>(val o: T) { + fun simple(): String = o.toString() +} + +fun testUnboxed(i: IcInt, l: IcLong, a: IcAny, o: IcOverIc>): String = + foo(i::simple) + foo(l::simple) + foo(a::simple) + foo(o::simple) + +fun testBoxed(i: IcInt?, l: IcLong?, a: IcAny?, o: IcOverIc>?): String = + foo(i!!::simple) + foo(l!!::simple) + foo(a!!::simple) + foo(o!!::simple) + +fun testLocalVars(): String { + val i = IcInt(0) + val l = IcLong(1L) + val a = IcAny(2) + val o = IcOverIc(IcLong(3)) + + return foo(i::simple) + foo(l::simple) + foo(a::simple) + foo(o::simple) +} + +val ip = IcInt(1) +val lp = IcLong(2L) +val ap = IcAny(3) +val op = IcOverIc(IcLong(4)) + +fun testGlobalProperties(): String = + foo(ip::simple) + foo(lp::simple) + foo(ap::simple) + foo(op::simple) + +fun testCapturedVars(): String { + return IcInt(2).let { foo(it::simple) } + + IcLong(3).let { foo(it::simple) } + + IcAny(4).let { foo(it::simple) } + + IcOverIc(IcLong(5)).let { foo(it::simple) } +} + +inline fun foo(init: () -> String): String = init() + +fun box(): String { + val i = IcInt(3) + val l = IcLong(4) + val a = IcAny(5) + val o = IcOverIc(IcLong(6)) + + if (testUnboxed(i, l, a, o) != "345IcLong(l=6)") return "Fail 1 ${testUnboxed(i, l, a, o)}" + if (testBoxed(i, l, a, o) != "345IcLong(l=6)") return "Fail 2" + if (testLocalVars() != "012IcLong(l=3)") return "Fail 3" + if (testGlobalProperties() != "123IcLong(l=4)") return "Fail 4" + if (testCapturedVars() != "234IcLong(l=5)") return "Fail 5 ${testCapturedVars()}" + + return "OK" +} diff --git a/compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric2.kt new file mode 100644 index 00000000000..5c8d8fee5d4 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric2.kt @@ -0,0 +1,14 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +abstract class C { + fun foo(v: T?, x: (T) -> Any?) = v?.let { x(it) } +} + +OPTIONAL_JVM_INLINE_ANNOTATION +value class V(val value: T?) + +class D : C>() + +fun box() = D().foo(V("OK")) { it.value } as String diff --git a/compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt new file mode 100644 index 00000000000..e9df62b80b8 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt @@ -0,0 +1,46 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +class BoxT(val boxed: T?) +class BoxAny(val boxed: Any?) +class BoxFoo(val boxed: IFoo?) + +interface IFoo + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Str(val value: T) : IFoo + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Str2>(val value: T): IFoo + +OPTIONAL_JVM_INLINE_ANNOTATION +value class StrArr(val value: Array): IFoo + +fun boxToTypeParameter(x: Str?) = BoxT(x) +fun boxToNullableAny(x: Str?) = BoxAny(x) +fun boxToNullableInterface(x: Str?) = BoxFoo(x) + +fun box2ToTypeParameter(x: Str2>?) = BoxT(x) +fun box2ToNullableAny(x: Str2>?) = BoxAny(x) +fun box2ToNullableInterface(x: Str2>?) = BoxFoo(x) + +fun boxArrToTypeParameter(x: StrArr?) = BoxT(x) +fun boxArrToNullableAny(x: StrArr?) = BoxAny(x) +fun boxArrToNullableInterface(x: StrArr?) = BoxFoo(x) + +fun box(): String { + if (boxToNullableAny(null).boxed != null) throw AssertionError() + if (boxToTypeParameter(null).boxed != null) throw AssertionError() + if (boxToNullableInterface(null).boxed != null) throw AssertionError() + + if (box2ToNullableAny(null).boxed != null) throw AssertionError() + if (box2ToTypeParameter(null).boxed != null) throw AssertionError() + if (box2ToNullableInterface(null).boxed != null) throw AssertionError() + + if (boxArrToNullableAny(null).boxed != null) throw AssertionError() + if (boxArrToTypeParameter(null).boxed != null) throw AssertionError() + if (boxArrToNullableInterface(null).boxed != null) throw AssertionError() + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt new file mode 100644 index 00000000000..4f585317327 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt @@ -0,0 +1,24 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +class BoxT(val boxed: T?) +class BoxAny(val boxed: Any?) +class BoxFoo(val boxed: IFoo?) + +interface IFoo + +OPTIONAL_JVM_INLINE_ANNOTATION +value class I32(val value: T): IFoo + +fun boxToTypeParameter(x: I32?) = BoxT(x) +fun boxToNullableAny(x: I32?) = BoxAny(x) +fun boxToNullableInterface(x: I32?) = BoxFoo(x) + +fun box(): String { + if (boxToNullableAny(null).boxed != null) throw AssertionError() + if (boxToTypeParameter(null).boxed != null) throw AssertionError() + if (boxToNullableInterface(null).boxed != null) throw AssertionError() + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric2.kt new file mode 100644 index 00000000000..963c3cc4fe5 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric2.kt @@ -0,0 +1,27 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Result(val a: T?) + +fun box(): String { + val a = Result(1) // valueOf + val b = Result("sample") + val c = Result>(a) + val d = Result>(Result(1)) // valueOf + + if (a.a !is Int) throw AssertionError() + + if (b.a !is String) throw AssertionError() + + if (c.a !is Result<*>) throw AssertionError() + val ca = c.a as Result<*> + if (ca.a !is Int) throw AssertionError() + + if (d.a !is Result<*>) throw AssertionError() + val da = d.a as Result<*> + if (da.a !is Int) throw AssertionError() + + return "OK" +} diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric2.kt new file mode 100644 index 00000000000..541f23d31e2 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric2.kt @@ -0,0 +1,12 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class X(val x: T?) + +fun useX(x: X): String = x.x!! + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X("OK") }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric2.kt new file mode 100644 index 00000000000..df8b53631de --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric2.kt @@ -0,0 +1,12 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class X(val x: T?) + +fun useX(x: X): String = if (x.x == null) "OK" else "fail: $x" + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X(null) }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric2.kt new file mode 100644 index 00000000000..0c9c31ed426 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric2.kt @@ -0,0 +1,12 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class X(val x: T?) + +fun useX(x: X): String = if (x.x == 42) "OK" else "fail: $x" + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X(42) }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric2.kt new file mode 100644 index 00000000000..f4ca7ecc3e0 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric2.kt @@ -0,0 +1,12 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class X(val x: T?) + +fun useX(x: X): String = if (x.x == null) "OK" else "fail: $x" + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X(null) }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric2.kt new file mode 100644 index 00000000000..9bd45e35f38 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric2.kt @@ -0,0 +1,12 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class X(val x: T?) + +fun useX(x: X): String = x.x ?: "fail: $x" + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X("OK") }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric2.kt new file mode 100644 index 00000000000..df60d9ed433 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric2.kt @@ -0,0 +1,12 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class X(val x: T?) + +fun useX(x: X): String = if (x.x == null) "OK" else "fail: $x" + +fun call(fn: () -> T) = fn() + +fun box() = useX(call { X(null) }) \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric2.kt new file mode 100644 index 00000000000..984f1655bcd --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric2.kt @@ -0,0 +1,36 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class X(val x: T?) + +interface IBar { + fun bar(): Any +} + +interface IFoo : IBar { + fun foo(): Any + override fun bar(): X +} + +class TestX : IFoo { + override fun foo(): X = X("O") + override fun bar(): X = X("K") +} + +fun box(): String { + val t: IFoo = TestX() + val tFoo = t.foo() + if (tFoo !is X<*>) { + throw AssertionError("X expected: $tFoo") + } + + val t2: IBar = TestX() + val tBar = t.bar() + if (tBar !is X<*>) { + throw AssertionError("X expected: $tBar") + } + + return (t.foo() as X).x!!.toString() + (t2.bar() as X).x!!.toString() +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic2.kt new file mode 100644 index 00000000000..81d9804e528 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic2.kt @@ -0,0 +1,20 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class ResultOrClosed(val x: T?) + +interface A { + fun foo(): T +} + +class B : A> { + override fun foo(): ResultOrClosed = ResultOrClosed("OK") +} + +fun box(): String { + val foo: Any = (B() as A>).foo() + if (foo !is ResultOrClosed<*>) throw AssertionError("foo: $foo") + return foo.x.toString() +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt similarity index 100% rename from compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt rename to compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt new file mode 100644 index 00000000000..89ca9606cd2 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt @@ -0,0 +1,26 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class X(val x: T?) + +interface IFoo?> { + fun foo(): T +} + +class Test : IFoo> { + override fun foo(): X = X("OK") +} + +fun box(): String { + val t1: IFoo> = Test() + val x1 = t1.foo() + if (x1 != X("OK")) throw AssertionError("x1: $x1") + + val t2 = Test() + val x2 = t2.foo() + if (x2 != X("OK")) throw AssertionError("x2: $x2") + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt similarity index 100% rename from compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt rename to compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt new file mode 100644 index 00000000000..2afc8ec9974 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt @@ -0,0 +1,28 @@ +// IGNORE_BACKEND: JS_IR +// WITH_STDLIB +// IGNORE_BACKEND: JS_IR_ES6 +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class X(val x: T?) + +interface IFoo?> { + fun foo(): T +} + +class Test : IFoo> { + override fun foo(): X = X(null) +} + +fun box(): String { + val t1: IFoo?> = Test() + val x1 = t1.foo() + if (x1 != X(null)) throw AssertionError("x1: $x1") + + val t2 = Test() + val x2 = t2.foo() + if (x2 != X(null)) throw AssertionError("x2: $x2") + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt new file mode 100644 index 00000000000..b5ccaf39d74 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt @@ -0,0 +1,26 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class X(val x: T?) + +interface IFoo { + fun foo(): X? +} + +class Test : IFoo { + override fun foo(): X? = X("OK") +} + +fun box(): String { + val t1: IFoo = Test() + val x1 = t1.foo() + if (x1 != X("OK")) throw AssertionError("x1: $x1") + + val t2 = Test() + val x2 = t2.foo() + if (x2 != X("OK")) throw AssertionError("x2: $x2") + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt new file mode 100644 index 00000000000..13703d3aff4 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt @@ -0,0 +1,26 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class X(val x: T?) + +interface IFoo { + fun foo(): X? +} + +class Test : IFoo { + override fun foo(): X? = X(null) +} + +fun box(): String { + val t1: IFoo = Test() + val x1 = t1.foo() + if (x1 != X(null)) throw AssertionError("x1: $x1") + + val t2 = Test() + val x2 = t2.foo() + if (x2 != X(null)) throw AssertionError("x2: $x2") + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric2.kt new file mode 100644 index 00000000000..ee606a85f0a --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric2.kt @@ -0,0 +1,37 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Result(val a: T?) { + fun getOrThrow(): T? = a +} + +abstract class ResultReceiver { + abstract fun receive(result: Result) +} + +fun ResultReceiver(f: (Result) -> Unit): ResultReceiver = + object : ResultReceiver() { + override fun receive(result: Result) { + f(result) + } + } + +fun test() { + var invoked = false + val receiver = ResultReceiver { result -> + val intResult = result.getOrThrow() + invoked = true + } + + receiver.receive(Result(42)) + if (!invoked) { + throw RuntimeException("Fail") + } +} + +fun box(): String { + test() + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric2.kt new file mode 100644 index 00000000000..30fc50b681b --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric2.kt @@ -0,0 +1,33 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Value(val value: T?) + +object Foo { + fun foo(value: Value) { + res = value.value + } + + fun bar(value: Value?) { + res = value?.value + } +} + +var res: String? = "FAIL" + +fun box(): String { + Value("OK").let(Foo::foo) + if (res != "OK") return "FAIL 1: $res" + res = "FAIL 2" + + Value("OK").let(Foo::bar) + if (res != "OK") return "FAIL 3: $res" + res = "FAIL 4" + + null.let(Foo::bar) + if (res != null) return "FAIL 5: $res" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt new file mode 100644 index 00000000000..c9da16340c3 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt @@ -0,0 +1,34 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// CHECK_BYTECODE_LISTING +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Value(val value: T?) + +object Foo { + fun foo(value: Value) { + res = value.value + } + + fun bar(value: Value?) { + res = value?.value + } +} + +var res: Int? = 0 + +fun box(): String { + Value(42).let(Foo::foo) + if (res != 42) return "FAIL 1 $res" + res = 0 + + Value(42).let(Foo::bar) + if (res != 42) return "FAIL 2 $res" + res = 0 + + null.let(Foo::bar) + if (res != null) return "FAIL 3: $res" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.txt b/compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.txt new file mode 100644 index 00000000000..bae8a7da7ae --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.txt @@ -0,0 +1,38 @@ +@kotlin.Metadata +public final class Foo { + // source: 'intNGeneric2.kt' + public final static @org.jetbrains.annotations.NotNull field INSTANCE: Foo + static method (): void + private method (): void + public final method bar-vRV1vHs(@org.jetbrains.annotations.Nullable p0: Value): void + public final method foo-YR_CVCc(@org.jetbrains.annotations.NotNull p0: java.lang.Integer): void +} + +@kotlin.Metadata +public final class IntNGeneric2Kt { + // source: 'intNGeneric2.kt' + private static @org.jetbrains.annotations.Nullable field res: java.lang.Integer + static method (): void + public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String + public final static @org.jetbrains.annotations.Nullable method getRes(): java.lang.Integer + public final static method setRes(@org.jetbrains.annotations.Nullable p0: java.lang.Integer): void +} + +@kotlin.jvm.JvmInline +@kotlin.Metadata +public final class Value { + // source: 'intNGeneric2.kt' + private final @org.jetbrains.annotations.Nullable field value: java.lang.Integer + private synthetic method (p0: java.lang.Integer): void + public synthetic final static method box-impl(p0: java.lang.Integer): Value + public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: java.lang.Integer): java.lang.Integer + public method equals(p0: java.lang.Object): boolean + public static method equals-impl(p0: java.lang.Integer, p1: java.lang.Object): boolean + public final static method equals-impl0(p0: java.lang.Integer, p1: java.lang.Integer): boolean + public final @org.jetbrains.annotations.Nullable method getValue(): java.lang.Integer + public method hashCode(): int + public static method hashCode-impl(p0: java.lang.Integer): int + public method toString(): java.lang.String + public static method toString-impl(p0: java.lang.Integer): java.lang.String + public synthetic final method unbox-impl(): java.lang.Integer +} diff --git a/compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric2.kt new file mode 100644 index 00000000000..e4819cca78d --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric2.kt @@ -0,0 +1,32 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Value(val value: T?) + +object Foo { + fun foo(value: Value) { + res = value.value + } + + fun bar(value: Value?) { + res = value?.value + } +} + +var res: String? = "FAIL" + +fun box(): String { + Value("OK").let(Foo::foo) + if (res != "OK") return "FAIL 1: $res" + res = "FAIL 2" + + Value("OK").let(Foo::bar) + if (res != "OK") return "FAIL 3: $res" + res = "FAIL 4" + + null.let(Foo::bar) + if (res != null) return "FAIL 3: $res" + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperatorGeneric.kt b/compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperatorGeneric.kt index 3b3103e18f3..a7da1f337c9 100644 --- a/compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperatorGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/checkBoxingAfterAssertionOperatorGeneric.kt @@ -14,6 +14,10 @@ OPTIONAL_JVM_INLINE_ANNOTATION value class WithNullableReference(val a: T) fun takeWithNullableReference(a: WithNullableReference) {} +OPTIONAL_JVM_INLINE_ANNOTATION +value class WithNullableReference2(val a: T?) +fun takeWithNullableReference2(a: WithNullableReference2) {} + fun foo(a: WithPrimitive?, b: WithPrimitive) { takeWithPrimitive(a!!) // unbox takeWithPrimitive(a) // unbox @@ -33,6 +37,13 @@ fun baz(a: WithNullableReference?, b: WithNullableReference) { takeWithNullableReference(b!!) } +fun baz2(a: WithNullableReference2?, b: WithNullableReference2) { + takeWithNullableReference2(a!!) // unbox + takeWithNullableReference2(a) // unbox + takeWithNullableReference2(a!!) // unbox + takeWithNullableReference2(b!!) +} + fun box(): String { val a1 = WithPrimitive(1) val b1 = WithPrimitive(2) @@ -48,5 +59,10 @@ fun box(): String { baz(a3, a4) + val a32 = WithNullableReference2("test") + val a42 = WithNullableReference2(123) + + baz2(a32, a42) + return "OK" } \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignmentsGeneric.kt b/compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignmentsGeneric.kt index f843e7bde79..5128d187538 100644 --- a/compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignmentsGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/checkBoxingOnLocalVariableAssignmentsGeneric.kt @@ -14,6 +14,9 @@ value class InlineNotNullReference(val a: T) OPTIONAL_JVM_INLINE_ANNOTATION value class InlineNullableReference(val a: T) +OPTIONAL_JVM_INLINE_ANNOTATION +value class InlineNullableReference2(val a: T?) + fun test1(a: InlineNotNullPrimitive) { val a0 = a val a1: Any = a // box @@ -46,16 +49,26 @@ fun test4(d: InlineNullableReference) { val d4: InlineNullableReference? = d // box } +fun test5(e: InlineNullableReference2) { + val e0 = e + val e1: Any = e // box + val e2: Any? = e // box + val e3: InlineNullableReference2 = e + val e4: InlineNullableReference2? = e // box +} + fun box(): String { val a = InlineNotNullPrimitive(1) val b = InlineNullablePrimitive(1) val c = InlineNotNullReference("some") val d = InlineNullableReference("other") + val e = InlineNullableReference2("other2") test1(a) test2(b) test3(c) test4(d) + test5(e) return "OK" } \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric2.kt new file mode 100644 index 00000000000..0f637494da3 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric2.kt @@ -0,0 +1,43 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Result(val a: T?) { + fun typed(): T? = a +} + +fun takeResult(r: Result) {} +fun takeResultOfInt(r: Result) {} +fun takeInt(i: Int) {} + + +fun box(): String { + val asInt = Result(19) + val asString = Result("sample") + val asResult = Result>(asInt) + val asResultCtor = Result>(Result(10)) + + takeResult(asInt) + takeResult(asString) + takeResult(asResult) + takeResult(asResultCtor) + + takeResultOfInt(asInt) + takeInt(asInt.typed()!!) + + val unboxedInt = asInt.typed() + val unboxedString = asString.typed() + val unboxedResult = asResult.typed() + val unboxedAsCtor = asResultCtor.typed() + + if (unboxedInt != 19) return "fail 1" + if (unboxedString != "sample") return "fail 2" + if (unboxedResult?.typed() != 19) return "fail 3" + if (unboxedAsCtor?.typed() != 10) return "fail 4" + + if (asResult?.typed()?.typed() != 19) return "fail 5" + if (asResultCtor?.typed()?.typed() != 10) return "fail 6" + + return "OK" +} diff --git a/compiler/testData/codegen/box/inlineClasses/classLiteralOnInlineClassGeneric.kt b/compiler/testData/codegen/box/inlineClasses/classLiteralOnInlineClassGeneric.kt index d90b03858c5..41c73f93b8c 100644 --- a/compiler/testData/codegen/box/inlineClasses/classLiteralOnInlineClassGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/classLiteralOnInlineClassGeneric.kt @@ -18,6 +18,9 @@ value class IcLong(val l: T) OPTIONAL_JVM_INLINE_ANNOTATION value class IcAny(val a: T) +OPTIONAL_JVM_INLINE_ANNOTATION +value class IcAny2(val a: T?) + OPTIONAL_JVM_INLINE_ANNOTATION value class IcOverIc>(val o: T) @@ -38,23 +41,27 @@ fun box(): String { val i = IcInt(0) val l = IcLong(0) val a = IcAny("foo") + val a2 = IcAny2("foo2") val o = IcOverIc(IcLong(0)) check(i::class, "class root.IcInt") check(l::class, "class root.IcLong") check(a::class, "class root.IcAny") + check(a2::class, "class root.IcAny2") check(o::class, "class root.IcOverIc") check(1u::class, "class kotlin.UInt") check(i::class.simpleName, "IcInt") check(l::class.simpleName, "IcLong") check(a::class.simpleName, "IcAny") + check(a2::class.simpleName, "IcAny2") check(o::class.simpleName, "IcOverIc") check(1u::class.simpleName, "UInt") reifiedCheck>("class root.IcInt", "IcInt") reifiedCheck>("class root.IcLong", "IcLong") reifiedCheck>("class root.IcAny", "IcAny") + reifiedCheck>("class root.IcAny2", "IcAny2") reifiedCheck>>("class root.IcOverIc", "IcOverIc") reifiedCheck("class kotlin.UInt", "UInt") @@ -67,6 +74,9 @@ fun box(): String { val arrA = arrayOf(a) check(arrA[0]::class, "class root.IcAny") + val arrA2 = arrayOf(a2) + check(arrA2[0]::class, "class root.IcAny2") + val arrO = arrayOf(o) check(arrO[0]::class, "class root.IcOverIc") @@ -76,6 +86,7 @@ fun box(): String { check(IcInt::class, "class root.IcInt") check(IcLong::class, "class root.IcLong") check(IcAny::class, "class root.IcAny") + check(IcAny2::class, "class root.IcAny2") check(IcOverIc::class, "class root.IcOverIc") check(UInt::class, "class kotlin.UInt") diff --git a/compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric2.kt new file mode 100644 index 00000000000..fdc51a34e6d --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric2.kt @@ -0,0 +1,37 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Result(val a: T?) { + fun getOrThrow(): T? = a +} + +abstract class ResultReceiver { + abstract fun receive(result: Result) +} + +inline fun ResultReceiver(crossinline f: (Result) -> Unit): ResultReceiver = + object : ResultReceiver() { + override fun receive(result: Result) { + f(result) + } + } + +fun test() { + var invoked = false + val receiver = ResultReceiver { result -> + val intResult = result.getOrThrow() + invoked = true + } + + receiver.receive(Result("42")) + if (!invoked) { + throw RuntimeException("Fail") + } +} + +fun box(): String { + test() + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric2.kt new file mode 100644 index 00000000000..4d6c8a9a618 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric2.kt @@ -0,0 +1,76 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class A(val x: T?) + +fun isNotNullVacuousLeft(s: A) = s != null +fun isNotNullVacuousRight(s: A) = null != s +fun isNotNullLeft(s: A?) = s != null +fun isNotNullRight(s: A?) = null != s +fun isNotEqualSame(s: A, t: A) = s != t +fun isNotEqualAnyLeft(s: A, t: Any?) = s != t +fun isNotEqualAnyRight(s: Any?, t: A) = s != t +fun isNotEqualSameNullable(s: A?, t: A?) = s != t +fun isNotEqualAnyNullableLeft(s: A?, t: Any?) = s != t +fun isNotEqualAnyNullableRight(s: Any?, t: A?) = s != t +fun isNotEqualNullableUnboxedLeft(s: A, t: A?) = s != t +fun isNotEqualNullableUnboxedRight(s: A?, t: A) = s != t + +fun box(): String { + if (!isNotNullVacuousLeft(A(0))) return "Fail 1" + if (!isNotNullVacuousRight(A(0))) return "Fail 2" + if (!isNotNullLeft(A(0))) return "Fail 3" + if (!isNotNullRight(A(0))) return "Fail 4" + if (isNotNullLeft(null)) return "Fail 5" + if (isNotNullRight(null)) return "Fail 6" + if (isNotEqualSame(A(0), A(0))) return "Fail 7" + if (!isNotEqualSame(A(0), A(1))) return "Fail 8" + if (!isNotEqualAnyLeft(A(0), 0)) return "Fail 9" + if (!isNotEqualAnyLeft(A(0), null)) return "Fail 10" + if (isNotEqualAnyLeft(A(0), A(0))) return "Fail 11" + if (!isNotEqualAnyRight(0, A(0))) return "Fail 12" + if (!isNotEqualAnyRight(null, A(0))) return "Fail 13" + if (isNotEqualAnyRight(A(0), A(0))) return "Fail 14" + if (isNotEqualSameNullable(null, null)) return "Fail 15" + if (isNotEqualSameNullable(A(0), A(0))) return "Fail 16" + if (!isNotEqualSameNullable(null, A(0))) return "Fail 17" + if (!isNotEqualSameNullable(A(0), null)) return "Fail 18" + if (!isNotEqualSameNullable(A(0), A(1))) return "Fail 19" + if (isNotEqualAnyNullableLeft(null, null)) return "Fail 20" + if (isNotEqualAnyNullableLeft(A(0), A(0))) return "Fail 21" + if (!isNotEqualAnyNullableLeft(A(0), 0)) return "Fail 22" + if (!isNotEqualAnyNullableLeft(null, 0)) return "Fail 23" + if (!isNotEqualAnyNullableLeft(A(0), null)) return "Fail 24" + if (!isNotEqualAnyNullableLeft(A(0), A(1))) return "Fail 25" + if (isNotEqualAnyNullableRight(null, null)) return "Fail 26" + if (isNotEqualAnyNullableRight(A(0), A(0))) return "Fail 27" + if (!isNotEqualAnyNullableRight(0, A(0))) return "Fail 28" + if (!isNotEqualAnyNullableRight(0, null)) return "Fail 29" + if (!isNotEqualAnyNullableRight(null, A(0))) return "Fail 30" + if (!isNotEqualAnyNullableRight(A(0), A(1))) return "Fail 31" + + if (!isNotNullVacuousLeft(A(null))) return "Fail 32" + if (!isNotNullVacuousRight(A(null))) return "Fail 33" + if (!isNotNullLeft(A(null))) return "Fail 34" + if (!isNotNullRight(A(null))) return "Fail 35" + if (!isNotEqualAnyLeft(A(null), null)) return "Fail 36" + if (!isNotEqualAnyRight(null, A(null))) return "Fail 37" + if (!isNotEqualAnyNullableLeft(A(null), null)) return "Fail 38" + if (!isNotEqualAnyNullableRight(null, A(null))) return "Fail 39" + if (!isNotEqualSameNullable(A(null), null)) return "Fail 42" + if (!isNotEqualSameNullable(null, A(null))) return "Fail 43" + + if (!isNotEqualNullableUnboxedLeft(A(0), A(1))) return "Fail 44" + if (isNotEqualNullableUnboxedLeft(A(0), A(0))) return "Fail 45" + if (!isNotEqualNullableUnboxedRight(A(0), A(1))) return "Fail 46" + if (isNotEqualNullableUnboxedRight(A(1), A(1))) return "Fail 47" + if (!isNotEqualNullableUnboxedLeft(A(0), null)) return "Fail 48" + if (!isNotEqualNullableUnboxedRight(null, A(1))) return "Fail 49" + + if (!isNotEqualNullableUnboxedRight(null, A(null))) return "Fail 50" + if (!isNotEqualNullableUnboxedLeft(A(null), null)) return "Fail 51" + + return "OK" +} diff --git a/compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric2.kt new file mode 100644 index 00000000000..7e858f1b111 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric2.kt @@ -0,0 +1,76 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class A(val x: T?) + +fun isNullVacuousLeft(s: A) = s == null +fun isNullVacuousRight(s: A) = null == s +fun isNullLeft(s: A?) = s == null +fun isNullRight(s: A?) = null == s +fun isEqualSame(s: A, t: A) = s == t +fun isEqualAnyLeft(s: A, t: Any?) = s == t +fun isEqualAnyRight(s: Any?, t: A) = s == t +fun isEqualSameNullable(s: A?, t: A?) = s == t +fun isEqualAnyNullableLeft(s: A?, t: Any?) = s == t +fun isEqualAnyNullableRight(s: Any?, t: A?) = s == t +fun isEqualNullableUnboxedLeft(s: A, t: A?) = s == t +fun isEqualNullableUnboxedRight(s: A?, t: A) = s == t + +fun box(): String { + if (isNullVacuousLeft(A(0))) return "Fail 1" + if (isNullVacuousRight(A(0))) return "Fail 2" + if (isNullLeft(A(0))) return "Fail 3" + if (isNullRight(A(0))) return "Fail 4" + if (!isNullLeft(null)) return "Fail 5" + if (!isNullRight(null)) return "Fail 6" + if (!isEqualSame(A(0), A(0))) return "Fail 7" + if (isEqualSame(A(0), A(1))) return "Fail 8" + if (isEqualAnyLeft(A(0), 0)) return "Fail 9" + if (isEqualAnyLeft(A(0), null)) return "Fail 10" + if (!isEqualAnyLeft(A(0), A(0))) return "Fail 11" + if (isEqualAnyRight(0, A(0))) return "Fail 12" + if (isEqualAnyRight(null, A(0))) return "Fail 13" + if (!isEqualAnyRight(A(0), A(0))) return "Fail 14" + if (!isEqualSameNullable(null, null)) return "Fail 15" + if (!isEqualSameNullable(A(0), A(0))) return "Fail 16" + if (isEqualSameNullable(null, A(0))) return "Fail 17" + if (isEqualSameNullable(A(0), null)) return "Fail 18" + if (isEqualSameNullable(A(0), A(1))) return "Fail 19" + if (!isEqualAnyNullableLeft(null, null)) return "Fail 20" + if (!isEqualAnyNullableLeft(A(0), A(0))) return "Fail 21" + if (isEqualAnyNullableLeft(A(0), 0)) return "Fail 22" + if (isEqualAnyNullableLeft(null, 0)) return "Fail 23" + if (isEqualAnyNullableLeft(A(0), null)) return "Fail 24" + if (isEqualAnyNullableLeft(A(0), A(1))) return "Fail 25" + if (!isEqualAnyNullableRight(null, null)) return "Fail 26" + if (!isEqualAnyNullableRight(A(0), A(0))) return "Fail 27" + if (isEqualAnyNullableRight(0, A(0))) return "Fail 28" + if (isEqualAnyNullableRight(0, null)) return "Fail 29" + if (isEqualAnyNullableRight(null, A(0))) return "Fail 30" + if (isEqualAnyNullableRight(A(0), A(1))) return "Fail 31" + + if (isNullVacuousLeft(A(null))) return "Fail 32" + if (isNullVacuousRight(A(null))) return "Fail 33" + if (isNullLeft(A(null))) return "Fail 34" + if (isNullRight(A(null))) return "Fail 35" + if (isEqualAnyLeft(A(null), null)) return "Fail 36" + if (isEqualAnyRight(null, A(null))) return "Fail 37" + if (isEqualAnyNullableLeft(A(null), null)) return "Fail 38" + if (isEqualAnyNullableRight(null, A(null))) return "Fail 39" + if (isEqualSameNullable(A(null), null)) return "Fail 42" + if (isEqualSameNullable(null, A(null))) return "Fail 43" + + if (isEqualNullableUnboxedLeft(A(0), A(1))) return "Fail 44" + if (!isEqualNullableUnboxedLeft(A(0), A(0))) return "Fail 45" + if (isEqualNullableUnboxedRight(A(0), A(1))) return "Fail 46" + if (!isEqualNullableUnboxedRight(A(1), A(1))) return "Fail 47" + if (isEqualNullableUnboxedLeft(A(0), null)) return "Fail 48" + if (isEqualNullableUnboxedRight(null, A(1))) return "Fail 49" + + if (isEqualNullableUnboxedRight(null, A(null))) return "Fail 50" + if (isEqualNullableUnboxedLeft(A(null), null)) return "Fail 51" + + return "OK" +} diff --git a/compiler/testData/codegen/box/inlineClasses/equalityForBoxesOfNullableValuesOfInlineClassGeneric.kt b/compiler/testData/codegen/box/inlineClasses/equalityForBoxesOfNullableValuesOfInlineClassGeneric.kt index b235ac8f914..a87a87e4343 100644 --- a/compiler/testData/codegen/box/inlineClasses/equalityForBoxesOfNullableValuesOfInlineClassGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/equalityForBoxesOfNullableValuesOfInlineClassGeneric.kt @@ -13,9 +13,16 @@ value class Y(val y: T) OPTIONAL_JVM_INLINE_ANNOTATION value class NX(val x: T) + +OPTIONAL_JVM_INLINE_ANNOTATION +value class NX2(val x: T?) + OPTIONAL_JVM_INLINE_ANNOTATION value class NY(val y: T) +OPTIONAL_JVM_INLINE_ANNOTATION +value class NY2(val y: T?) + fun testNotNull(x: X?, y: Y?) { val xs = listOf(x) val ys = listOf(y) @@ -32,6 +39,14 @@ fun testNullable(x: NX?, y: NY?) { if (xs[0] === ys[0]) throw AssertionError() } +fun testNullable2(x: NX2?, y: NY2?) { + val xs = listOf(x) + val ys = listOf(y) + if (xs.contains(y)) throw AssertionError() + if (xs[0] == ys[0]) throw AssertionError() + if (xs[0] === ys[0]) throw AssertionError() +} + fun testNullsAsNullable(x: NX?, y: NY?) { val xs = listOf(x) val ys = listOf(y) @@ -40,6 +55,14 @@ fun testNullsAsNullable(x: NX?, y: NY?) { if (xs[0] !== ys[0]) throw AssertionError() } +fun testNullsAsNullable2(x: NX2?, y: NY2?) { + val xs = listOf(x) + val ys = listOf(y) + if (!xs.contains(y)) throw AssertionError() + if (xs[0] != ys[0]) throw AssertionError() + if (xs[0] !== ys[0]) throw AssertionError() +} + fun box(): String { testNotNull(null, null) @@ -48,7 +71,13 @@ fun box(): String { testNullable(NX(null), null) testNullable(null, NY(null)) + testNullable2(NX2(null), NY2(null)) + testNullable2(NX2(null), null) + testNullable2(null, NY2(null)) + testNullsAsNullable(null, null) + testNullsAsNullable2(null, null) + return "OK" } \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric2.kt new file mode 100644 index 00000000000..898fa489e27 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric2.kt @@ -0,0 +1,35 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class A(val x: T? = null) + +var i = 0 + +fun set1(): A { + i = 1 + return A() +} + +fun test1(n: Int): A { + if (i != 1) + throw IllegalStateException("Fail $n") + i = 0 + return A() +} + +fun set1Boxed(): Any? = set1() +fun test1Boxed(n: Int): Any? = test1(n) + +fun box(): String { + try { + set1() == test1(1) + set1Boxed() == test1(2) + set1() == test1Boxed(3) + set1Boxed() == test1Boxed(4) + } catch (e: IllegalStateException) { + return e.message ?: "Fail no message" + } + return "OK" +} diff --git a/compiler/testData/codegen/box/inlineClasses/equalsOperatorWithGenericCallGeneric.kt b/compiler/testData/codegen/box/inlineClasses/equalsOperatorWithGenericCallGeneric.kt index 047447d87c7..f3c1953e3c9 100644 --- a/compiler/testData/codegen/box/inlineClasses/equalsOperatorWithGenericCallGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/equalsOperatorWithGenericCallGeneric.kt @@ -5,6 +5,8 @@ OPTIONAL_JVM_INLINE_ANNOTATION value class IcAny(val x: T) OPTIONAL_JVM_INLINE_ANNOTATION +value class IcAny2(val x: T?) +OPTIONAL_JVM_INLINE_ANNOTATION value class IcInt(val x: T) OPTIONAL_JVM_INLINE_ANNOTATION value class IcLong(val x: T) @@ -33,5 +35,12 @@ fun box(): String { if (id(IcAny(42)) == id(IcAny(24))) return "Error 3, 5" if (id(IcAny(42)) != id(IcAny(42))) return "Error 3, 6" + if (IcAny2(42) == id(IcAny2(24))) return "Error 4, 1" + if (IcAny2(42) != id(IcAny2(42))) return "Error 4, 2" + if (id(IcAny2(42)) == IcAny2(24)) return "Error 4, 3" + if (id(IcAny2(42)) != IcAny2(42)) return "Error 4, 4" + if (id(IcAny2(42)) == id(IcAny2(24))) return "Error 4, 5" + if (id(IcAny2(42)) != id(IcAny2(42))) return "Error 4, 6" + return "OK" } diff --git a/compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric2.kt new file mode 100644 index 00000000000..ae9bec43fc8 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric2.kt @@ -0,0 +1,22 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Result(val isSuccess: T?) + +fun interface ResultHandler { + fun onResult(result: Result) +} + +fun doSmth(resultHandler: ResultHandler) { + resultHandler.onResult(Result(true)) +} + +fun box(): String { + var res = "FAIL" + doSmth { result -> + res = if (result.isSuccess == true) "OK" else "FAIL 1" + } + return res +} diff --git a/compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric2.kt new file mode 100644 index 00000000000..15edaee3667 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric2.kt @@ -0,0 +1,20 @@ +// WITH_STDLIB +// IGNORE_BACKEND: JVM +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Result(val isSuccess: T?) + +fun interface ResultHandler { + fun onResult(): Result +} + +fun doSmth(resultHandler: ResultHandler): Result { + return resultHandler.onResult() +} + +fun box(): String { + var res = doSmth { Result(true) } + return if (res.isSuccess == true) "OK" else "FAIL" +} diff --git a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt new file mode 100644 index 00000000000..a5eecf310bd --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt @@ -0,0 +1,7 @@ +// CHECK_BYTECODE_LISTING +// LANGUAGE: -JvmInlineValueClasses, +GenericInlineClassParameter +// IGNORE_BACKED: JVM + +inline class ICAny(val value: T?) + +fun box(): String = ICAny("OK").value.toString() \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.txt b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.txt new file mode 100644 index 00000000000..df12ec4cf7a --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.txt @@ -0,0 +1,24 @@ +@kotlin.jvm.JvmInline +@kotlin.Metadata +public final class ICAny { + // source: 'simple2.kt' + private final @org.jetbrains.annotations.Nullable field value: java.lang.Object + private synthetic method (p0: java.lang.Object): void + public synthetic final static method box-impl(p0: java.lang.Object): ICAny + public static @org.jetbrains.annotations.NotNull method constructor-impl(@org.jetbrains.annotations.Nullable p0: java.lang.Object): java.lang.Object + public method equals(p0: java.lang.Object): boolean + public static method equals-impl(p0: java.lang.Object, p1: java.lang.Object): boolean + public final static method equals-impl0(p0: java.lang.Object, p1: java.lang.Object): boolean + public final @org.jetbrains.annotations.Nullable method getValue(): java.lang.Object + public method hashCode(): int + public static method hashCode-impl(p0: java.lang.Object): int + public method toString(): java.lang.String + public static method toString-impl(p0: java.lang.Object): java.lang.String + public synthetic final method unbox-impl(): java.lang.Object +} + +@kotlin.Metadata +public final class Simple2Kt { + // source: 'simple2.kt' + public final static @org.jetbrains.annotations.NotNull method box(): java.lang.String +} diff --git a/compiler/testData/codegen/box/inlineClasses/initBlockGeneric.kt b/compiler/testData/codegen/box/inlineClasses/initBlockGeneric.kt index 1656237d985..c45b6a61523 100644 --- a/compiler/testData/codegen/box/inlineClasses/initBlockGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/initBlockGeneric.kt @@ -19,6 +19,16 @@ value class MultipleInitBlocks(val a: T) { } } +OPTIONAL_JVM_INLINE_ANNOTATION +value class MultipleInitBlocks2(val a: T?) { + init { + res = "O" + } + init { + res += "K" + } +} + OPTIONAL_JVM_INLINE_ANNOTATION value class Lambda(val s: T) { init { @@ -137,6 +147,10 @@ fun box(): String { MultipleInitBlocks(null) if (res != "OK") return "FAIL 21: $res" + res = "FAIL 22" + MultipleInitBlocks2(null) + if (res != "OK") return "FAIL 221: $res" + res = "FAIL 3" Lambda("OK") if (res != "OK") return "FAIL 31: $res" diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassFunctionInvokeGeneric.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassFunctionInvokeGeneric.kt index 35912a93739..ef9f37b5ba1 100644 --- a/compiler/testData/codegen/box/inlineClasses/inlineClassFunctionInvokeGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassFunctionInvokeGeneric.kt @@ -11,12 +11,17 @@ value class Str(val string: T) OPTIONAL_JVM_INLINE_ANNOTATION value class NStr(val string: T) +OPTIONAL_JVM_INLINE_ANNOTATION +value class NStr2(val string: T?) + fun fooZ(x: Z) = x fun fooStr(x: Str) = x fun fooNStr(x: NStr) = x +fun fooNStr2(x: NStr2) = x + fun box(): String { val fnZ: (Z) -> Z = ::fooZ @@ -29,5 +34,9 @@ fun box(): String { if (fnNStr.invoke(NStr(null)).string != null) throw AssertionError() if (fnNStr.invoke(NStr("nstr")).string != "nstr") throw AssertionError() + val fnNStr2: (NStr2) -> NStr2 = ::fooNStr2 + if (fnNStr2.invoke(NStr2(null)).string != null) throw AssertionError() + if (fnNStr2.invoke(NStr2("nstr2")).string != "nstr2") throw AssertionError() + return "OK" } \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCastGeneric.kt b/compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCastGeneric.kt index ec1d865bfd4..93647ceea2f 100644 --- a/compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCastGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/inlineClassesCheckCastGeneric.kt @@ -5,6 +5,9 @@ OPTIONAL_JVM_INLINE_ANNOTATION value class AsAny(val x: T) +OPTIONAL_JVM_INLINE_ANNOTATION +value class AsAny2(val x: T?) + OPTIONAL_JVM_INLINE_ANNOTATION value class AsInt(val x: T) @@ -18,6 +21,14 @@ object Reference { fun transformNullableToNullableTarget(a: AsAny?): AsAny? = a as AsAny? } +object Reference2 { + fun transform(a: AsAny2): AsAny2 = a as AsAny2 + fun transformNullable(a: AsAny2?): AsAny2 = a as AsAny2 + fun transformToNullable(a: AsAny2): AsAny2? = a as AsAny2 + fun transformToNullableTarget(a: AsAny2): AsAny2? = a as AsAny2? + fun transformNullableToNullableTarget(a: AsAny2?): AsAny2? = a as AsAny2? +} + object Primitive { fun transform(a: AsInt): AsInt = a as AsInt fun transformNullable(a: AsInt?): AsInt = a as AsInt @@ -38,6 +49,17 @@ fun box(): String { val b7 = a.checkcast>() if (b7.x != a.x) return "Fail 1" + val a2 = AsAny2(42) + val b21 = Reference2.transform(a2) + val b22 = Reference2.transformNullable(a2) + val b23 = Reference2.transformToNullable(a2) + val b24 = Reference2.transformToNullableTarget(a2) + val b25 = Reference2.transformNullableToNullableTarget(a2) + val b26 = Reference2.transformNullableToNullableTarget(null) + + val b72 = a2.checkcast>() + if (b72.x != a2.x) return "Fail 12" + val c = AsInt(42) val d1 = Primitive.transform(c) val d2 = Primitive.transformNullable(c) diff --git a/compiler/testData/codegen/box/inlineClasses/javaClassIntrinsicOnInlineClassesGeneric.kt b/compiler/testData/codegen/box/inlineClasses/javaClassIntrinsicOnInlineClassesGeneric.kt index c352ecb5cbb..66800af4a44 100644 --- a/compiler/testData/codegen/box/inlineClasses/javaClassIntrinsicOnInlineClassesGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/javaClassIntrinsicOnInlineClassesGeneric.kt @@ -15,6 +15,9 @@ value class IcLong(val l: T) OPTIONAL_JVM_INLINE_ANNOTATION value class IcAny(val a: T) +OPTIONAL_JVM_INLINE_ANNOTATION +value class IcAny2(val a: T?) + OPTIONAL_JVM_INLINE_ANNOTATION value class IcOverIc>(val o: T) @@ -30,23 +33,27 @@ fun box(): String { val i = IcInt(0) val l = IcLong(0) val a = IcAny("foo") + val a2 = IcAny2("foo2") val o = IcOverIc(IcLong(0)) check(i.javaClass, "class root.IcInt") check(l.javaClass, "class root.IcLong") check(a.javaClass, "class root.IcAny") + check(a2.javaClass, "class root.IcAny2") check(o.javaClass, "class root.IcOverIc") check(1u.javaClass, "class kotlin.UInt") check(i::class.java, "class root.IcInt") check(l::class.java, "class root.IcLong") check(a::class.java, "class root.IcAny") + check(a2::class.java, "class root.IcAny2") check(o::class.java, "class root.IcOverIc") check(1u::class.java, "class kotlin.UInt") reifiedCheck>("class root.IcInt") reifiedCheck>("class root.IcLong") reifiedCheck>("class root.IcAny") + reifiedCheck>("class root.IcAny2") reifiedCheck>>("class root.IcOverIc") reifiedCheck("class kotlin.UInt") @@ -59,6 +66,9 @@ fun box(): String { val arrA = arrayOf(a) check(arrA[0].javaClass, "class root.IcAny") + val arrA2 = arrayOf(a2) + check(arrA2[0].javaClass, "class root.IcAny2") + val arrO = arrayOf(o) check(arrO[0].javaClass, "class root.IcOverIc") diff --git a/compiler/testData/codegen/box/inlineClasses/javaPrimitiveTypeICGeneric.kt b/compiler/testData/codegen/box/inlineClasses/javaPrimitiveTypeICGeneric.kt index 7feb64871c5..92a395c3158 100644 --- a/compiler/testData/codegen/box/inlineClasses/javaPrimitiveTypeICGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/javaPrimitiveTypeICGeneric.kt @@ -14,13 +14,18 @@ value class JLI(val x: T) OPTIONAL_JVM_INLINE_ANNOTATION value class U(val x: T) +OPTIONAL_JVM_INLINE_ANNOTATION +value class U2(val x: T?) + OPTIONAL_JVM_INLINE_ANNOTATION value class N(val x: T) val icUnit = U(Unit) +val icUnit2 = U2(Unit) val icNull = N(null) val anyIcUnit: Any = icUnit +val anyIcUnit2: Any = icUnit2 val anyIcNull: Any = icNull val z = I(42) @@ -28,13 +33,16 @@ val jli = JLI(java.lang.Integer(42)) fun box(): String { assertEquals(null, icUnit::class.javaPrimitiveType) + assertEquals(null, icUnit2::class.javaPrimitiveType) assertEquals(null, icNull::class.javaPrimitiveType) assertEquals(null, anyIcUnit::class.javaPrimitiveType) + assertEquals(null, anyIcUnit2::class.javaPrimitiveType) assertEquals(null, anyIcNull::class.javaPrimitiveType) assertEquals(null, z::class.javaPrimitiveType) assertEquals(null, jli::class.javaPrimitiveType) assertEquals(null, U::class.javaPrimitiveType) + assertEquals(null, U2::class.javaPrimitiveType) assertEquals(null, N::class.javaPrimitiveType) assertEquals(null, I::class.javaPrimitiveType) assertEquals(null, JLI::class.javaPrimitiveType) diff --git a/compiler/testData/codegen/box/inlineClasses/kclassInAnnotationGeneric.kt b/compiler/testData/codegen/box/inlineClasses/kclassInAnnotationGeneric.kt index 85c461eba27..884c979316a 100644 --- a/compiler/testData/codegen/box/inlineClasses/kclassInAnnotationGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/kclassInAnnotationGeneric.kt @@ -16,6 +16,9 @@ value class ICIntArray(val i: IntArray) OPTIONAL_JVM_INLINE_ANNOTATION value class ICIntN(val i: T) +OPTIONAL_JVM_INLINE_ANNOTATION +value class ICIntN2(val i: T?) + OPTIONAL_JVM_INLINE_ANNOTATION value class ICIntNArray(val i: Array) @@ -43,6 +46,10 @@ class CIntArray @AnnArray([ICIntN::class]) class CIntN +@Ann(ICIntN2::class) +@AnnArray([ICIntN2::class]) +class CIntN2 + @Ann(ICIntNArray::class) @AnnArray([ICIntNArray::class]) class CIntNArray @@ -73,6 +80,9 @@ fun box(): String { klass = (CIntN::class.annotations.first() as Ann).c.toString() if (klass != "class test.ICIntN") return "Expected class test.ICIntN, got $klass" + klass = (CIntN2::class.annotations.first() as Ann).c.toString() + if (klass != "class test.ICIntN2") return "Expected class test.ICIntN2, got $klass" + klass = (CIntNArray::class.annotations.first() as Ann).c.toString() if (klass != "class test.ICIntNArray") return "Expected class test.ICIntNArray, got $klass" @@ -98,6 +108,9 @@ fun box(): String { klass = (CIntN::class.annotations.last() as AnnArray).c[0].toString() if (klass != "class test.ICIntN") return "Expected class test.ICIntN, got $klass" + klass = (CIntN2::class.annotations.last() as AnnArray).c[0].toString() + if (klass != "class test.ICIntN2") return "Expected class test.ICIntN2, got $klass" + klass = (CIntNArray::class.annotations.last() as AnnArray).c[0].toString() if (klass != "class test.ICIntNArray") return "Expected class test.ICIntNArray, got $klass" diff --git a/compiler/testData/codegen/box/inlineClasses/kt26103_covariantUnderlyingType.kt b/compiler/testData/codegen/box/inlineClasses/kt26103_covariantUnderlyingType.kt index 26a25731bd2..dee54f59a6f 100644 --- a/compiler/testData/codegen/box/inlineClasses/kt26103_covariantUnderlyingType.kt +++ b/compiler/testData/codegen/box/inlineClasses/kt26103_covariantUnderlyingType.kt @@ -6,6 +6,9 @@ OPTIONAL_JVM_INLINE_ANNOTATION value class GList(val xs: List) +OPTIONAL_JVM_INLINE_ANNOTATION +value class GList2(val xs: List) + OPTIONAL_JVM_INLINE_ANNOTATION value class GSList(val ss: List) @@ -31,6 +34,10 @@ fun testGList(gl: GList) { if (gl.xs[0] != "OK") throw AssertionError() } +fun testGList2(gl: GList2) { + if (gl.xs[0] != "OK") throw AssertionError() +} + fun testGSList(sl: GSList) { if (sl.ss[0] != "OK") throw AssertionError() } @@ -57,6 +64,7 @@ fun testGIIList(giil: GIIList) { fun box(): String { testGList(GList(listOf("OK"))) + testGList2(GList2(listOf("OK"))) testGSList(GSList(listOf("OK"))) testSList(SList(listOf("OK"))) testIList(IList(listOf(42))) diff --git a/compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric2.kt new file mode 100644 index 00000000000..cd889795164 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric2.kt @@ -0,0 +1,33 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// IGNORE_BACKEND: JVM +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Z1(val x: T?) + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Z2>(val z: T) + +OPTIONAL_JVM_INLINE_ANNOTATION +value class ZN?>(val z: T) + +fun wrap1(n: Int): Z1? = if (n < 0) null else Z1(n) +fun wrap2(n: Int): Z2>? = if (n < 0) null else Z2(Z1(n)) +fun wrapN(n: Int): ZN?>? = if (n < 0) null else ZN(Z1(n)) + +fun box(): String { + if (wrap1(-1) != null) throw AssertionError() + if (wrap1(42) == null) throw AssertionError() + if (wrap1(42)!!.x != 42) throw AssertionError() + + if (wrap2(-1) != null) throw AssertionError() + if (wrap2(42) == null) throw AssertionError() + if (wrap2(42)!!.z.x != 42) throw AssertionError() + + if (wrapN(-1) != null) throw AssertionError() + if (wrapN(42) == null) throw AssertionError() + if (wrapN(42)!!.z!!.x != 42) throw AssertionError() + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric2.kt new file mode 100644 index 00000000000..54f6ec900ad --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric2.kt @@ -0,0 +1,33 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// IGNORE_BACKEND: JVM +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Z1(val x: T?) + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Z2>(val z: T) + +OPTIONAL_JVM_INLINE_ANNOTATION +value class ZN?>(val z: T) + +fun wrap1(x: String): Z1? = if (x.length == 0) null else Z1(x) +fun wrap2(x: String): Z2>? = if (x.length == 0) null else Z2(Z1(x)) +fun wrapN(x: String): ZN?>? = if (x.length == 0) null else ZN(Z1(x)) + +fun box(): String { + if (wrap1("") != null) throw AssertionError() + if (wrap1("a") == null) throw AssertionError() + if (wrap1("a")!!.x != "a") throw AssertionError() + + if (wrap2("") != null) throw AssertionError() + if (wrap2("a") == null) throw AssertionError() + if (wrap2("a")!!.z.x != "a") throw AssertionError() + + if (wrapN("") != null) throw AssertionError() + if (wrapN("a") == null) throw AssertionError() + if (wrapN("a")!!.z!!.x != "a") throw AssertionError() + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/kt44701_jvmOverloadsGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/kt44701_jvmOverloadsGeneric2.kt new file mode 100644 index 00000000000..5099f3e98af --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/kt44701_jvmOverloadsGeneric2.kt @@ -0,0 +1,10 @@ +// TARGET_BACKEND: JVM +// IGNORE_BACKEND: JVM +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Location @JvmOverloads constructor(val value: T? = "OK" as T) + +fun box(): String = Location().value!! diff --git a/compiler/testData/codegen/box/inlineClasses/kt51254.kt b/compiler/testData/codegen/box/inlineClasses/kt51254.kt index 65761bb5096..21089c3e9d5 100644 --- a/compiler/testData/codegen/box/inlineClasses/kt51254.kt +++ b/compiler/testData/codegen/box/inlineClasses/kt51254.kt @@ -1,6 +1,5 @@ // WITH_STDLIB // WORKS_WHEN_VALUE_CLASS -// IGNORE_BACKEND: JVM OPTIONAL_JVM_INLINE_ANNOTATION value class Inlined(val value: Int) diff --git a/compiler/testData/codegen/box/inlineClasses/mappingOfBoxedFlexibleInlineClassTypeGeneric.kt b/compiler/testData/codegen/box/inlineClasses/mappingOfBoxedFlexibleInlineClassTypeGeneric.kt index 184f1a8ca50..ad881f79d69 100644 --- a/compiler/testData/codegen/box/inlineClasses/mappingOfBoxedFlexibleInlineClassTypeGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/mappingOfBoxedFlexibleInlineClassTypeGeneric.kt @@ -21,6 +21,9 @@ value class IcLong(val l: T) OPTIONAL_JVM_INLINE_ANNOTATION value class IcAny(val a: T) +OPTIONAL_JVM_INLINE_ANNOTATION +value class IcAny2(val a: T?) + OPTIONAL_JVM_INLINE_ANNOTATION value class IcOverIc>(val o: T) @@ -28,16 +31,19 @@ fun box(): String { val i = IcInt(1) val l = IcLong(2) val a = IcAny("string") + val a2 = IcAny("string2") val o = IcOverIc(IcInt(3)) val ij = JavaClass.id(i) val lj = JavaClass.id(l) val aj = JavaClass.id(a) + val aj2 = JavaClass.id(a2) val oj = JavaClass.id(o) if (ij.i != 1) return "Fail 1" if (lj.l != 2L) return "Fail 2" if (aj.a != "string") return "Fail 3" + if (aj2.a != "string2") return "Fail 32" if (oj.o.i != 3) return "Fail 4" return "OK" diff --git a/compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric2.kt new file mode 100644 index 00000000000..6611ac65fd0 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric2.kt @@ -0,0 +1,25 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// IGNORE_BACKEND: JVM +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Z1(val x: T) + +OPTIONAL_JVM_INLINE_ANNOTATION +value class ZN>(val z: T?) + +OPTIONAL_JVM_INLINE_ANNOTATION +value class ZN2>>(val z: TN) + +fun zap(b: Boolean): ZN2>>? = if (b) null else ZN2(ZN(null)) + +fun eq(a: Any?, b: Any?) = a == b + +fun box(): String { + val x = zap(true) + val y = zap(false) + if (eq(x, y)) throw AssertionError() + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/resultGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/resultGeneric2.kt new file mode 100644 index 00000000000..3e32a32921b --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/resultGeneric2.kt @@ -0,0 +1,19 @@ +// IGNORE_BACKEND: WASM, JS_IR +// IGNORE_BACKEND: ANDROID +// IGNORE_BACKEND: NATIVE +// ALLOW_KOTLIN_PACKAGE +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +// FILE: result.kt +package kotlin + +OPTIONAL_JVM_INLINE_ANNOTATION +value class Result(val value: T?) + +// FILE: box.kt + +fun box(): String { + return Result("OK").value!! +} diff --git a/compiler/testData/codegen/box/inlineClasses/typeChecksForInlineClassesGeneric.kt b/compiler/testData/codegen/box/inlineClasses/typeChecksForInlineClassesGeneric.kt index df10e06147f..50221c7cf79 100644 --- a/compiler/testData/codegen/box/inlineClasses/typeChecksForInlineClassesGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/typeChecksForInlineClassesGeneric.kt @@ -9,6 +9,13 @@ value class AsAny(val a: T) { } } +OPTIONAL_JVM_INLINE_ANNOTATION +value class AsAny2(val a: T?) { + fun myEq(other: Any?): Boolean { + return other is AsAny2<*> && other.a == a + } +} + OPTIONAL_JVM_INLINE_ANNOTATION value class AsInt(val a: T) { fun myEq(other: Any?): Boolean { @@ -25,6 +32,13 @@ object Reference { fun isNullableNotNullable(a: AsAny?) = a is AsAny<*> } +object Reference2 { + fun isNullable(a: AsAny2) = a is AsAny2<*>? + fun isNotNullable(a: AsAny2) = a is AsAny2<*> + fun isNullableNullable(a: AsAny2?) = a is AsAny2<*>? + fun isNullableNotNullable(a: AsAny2?) = a is AsAny2<*> +} + object Primitive { fun isNullable(a: AsInt) = a is AsInt<*>? fun isNotNullable(a: AsInt) = a is AsInt<*> @@ -35,6 +49,8 @@ object Primitive { fun box(): String { val a = AsAny(42) val b = AsAny(40 + 2) + val a2 = AsAny2(42) + val b2 = AsAny2(40 + 2) if (!a.myEq(b)) return "Fail 1" if (a.myEq(42)) return "Fail 2" @@ -47,6 +63,13 @@ fun box(): String { if (!Reference.isNullableNotNullable(a)) return "Fail 8" if (Reference.isNullableNotNullable(null)) return "Fail 9" + if (!Reference2.isNullable(a2)) return "Fail 42" + if (!Reference2.isNotNullable(a2)) return "Fail 52" + if (!Reference2.isNullableNullable(a2)) return "Fail 62" + if (!Reference2.isNullableNullable(null)) return "Fail 72" + if (!Reference2.isNullableNotNullable(a2)) return "Fail 82" + if (Reference2.isNullableNotNullable(null)) return "Fail 92" + val c = AsInt(42) val d = AsInt(40 + 2) if (!c.myEq(d)) return "Fail 10" @@ -68,5 +91,9 @@ fun box(): String { if (!c.isCheck?>()) return "Fail 23" if (c.isCheck>()) return "Fail 24" + if (!a2.isCheck>()) return "Fail 192" + if (!a2.isCheck?>()) return "Fail 202" + if (a2.isCheck>()) return "Fail 212" + return "OK" } \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric2.kt new file mode 100644 index 00000000000..e94a7d218f7 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric2.kt @@ -0,0 +1,53 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// IGNORE_BACKEND: JVM +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +fun underlying(a: IC): T? = bar(a) { + it.value +} + +fun extension(a: IC): T? = bar(a) { + it.extensionValue() +} + +fun dispatch(a: IC): T? = bar(a) { + it.dispatchValue() +} + +fun normal(a: IC): T? = bar(a) { + normalValue(it) +} + +fun interface FunIFace { + fun call(ic: T): R +} + +fun bar(value: T, f: FunIFace): R { + return f.call(value) +} + +fun IC.extensionValue(): T? = value + +fun normalValue(ic: IC): T? = ic.value + +OPTIONAL_JVM_INLINE_ANNOTATION +value class IC(val value: T?) { + fun dispatchValue(): T? = value +} + +fun box(): String { + var res = underlying(IC(40))!! + 2 + if (res != 42) "FAIL 1 $res" + + res = extension(IC(40))!! + 3 + if (res != 43) return "FAIL 2: $res" + + res = dispatch(IC(40))!! + 4 + if (res != 44) return "FAIL 3: $res" + + res = normal(IC(40))!! + 5 + if (res != 45) return "FAIL 4: $res" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric.kt b/compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric.kt index ea955173c49..52ac512026c 100644 --- a/compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric.kt @@ -3,19 +3,19 @@ // IGNORE_BACKEND: JVM // LANGUAGE: +ValueClasses, +GenericInlineClassParameter -fun underlying(a: IC): T = bar(a) { +fun underlying(a: IC): T? = bar(a) { it.value } -fun extension(a: IC): T = bar(a) { +fun extension(a: IC): T? = bar(a) { it.extensionValue() } -fun dispatch(a: IC): T = bar(a) { +fun dispatch(a: IC): T? = bar(a) { it.dispatchValue() } -fun normal(a: IC): T = bar(a) { +fun normal(a: IC): T? = bar(a) { normalValue(it) } @@ -23,26 +23,26 @@ fun bar(value: T, f: (T) -> R): R { return f(value) } -fun IC.extensionValue(): T = value +fun IC.extensionValue(): T? = value -fun normalValue(ic: IC): T = ic.value +fun normalValue(ic: IC): T? = ic.value OPTIONAL_JVM_INLINE_ANNOTATION -value class IC(val value: T) { - fun dispatchValue(): T = value +value class IC(val value: T?) { + fun dispatchValue(): T? = value } fun box(): String { - var res = underlying(IC(40)) + 2 + var res = underlying(IC(40))!! + 2 if (res != 42) "FAIL 1 $res" - res = extension(IC(40)) + 3 + res = extension(IC(40))!! + 3 if (res != 43) return "FAIL 2: $res" - res = dispatch(IC(40)) + 4 + res = dispatch(IC(40))!! + 4 if (res != 44) return "FAIL 3: $res" - res = normal(IC(40)) + 5 + res = normal(IC(40))!! + 5 if (res != 45) return "FAIL 4: $res" return "OK" diff --git a/compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric2.kt new file mode 100644 index 00000000000..ea955173c49 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric2.kt @@ -0,0 +1,49 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// IGNORE_BACKEND: JVM +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +fun underlying(a: IC): T = bar(a) { + it.value +} + +fun extension(a: IC): T = bar(a) { + it.extensionValue() +} + +fun dispatch(a: IC): T = bar(a) { + it.dispatchValue() +} + +fun normal(a: IC): T = bar(a) { + normalValue(it) +} + +fun bar(value: T, f: (T) -> R): R { + return f(value) +} + +fun IC.extensionValue(): T = value + +fun normalValue(ic: IC): T = ic.value + +OPTIONAL_JVM_INLINE_ANNOTATION +value class IC(val value: T) { + fun dispatchValue(): T = value +} + +fun box(): String { + var res = underlying(IC(40)) + 2 + if (res != 42) "FAIL 1 $res" + + res = extension(IC(40)) + 3 + if (res != 43) return "FAIL 2: $res" + + res = dispatch(IC(40)) + 4 + if (res != 44) return "FAIL 3: $res" + + res = normal(IC(40)) + 5 + if (res != 45) return "FAIL 4: $res" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric2.kt new file mode 100644 index 00000000000..6bacf451c32 --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric2.kt @@ -0,0 +1,53 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// IGNORE_BACKEND: JVM +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +fun underlying(a: IC): T = bar(a, object : IFace, T> { + override fun call(ic: IC): T = ic.value +}) + +fun extension(a: IC): T = bar(a, object : IFace, T> { + override fun call(ic: IC): T = ic.extensionValue() +}) + +fun dispatch(a: IC): T = bar(a, object : IFace, T> { + override fun call(ic: IC): T = ic.dispatchValue() +}) + +fun normal(a: IC): T = bar(a, object : IFace, T> { + override fun call(ic: IC): T = normalValue(ic) +}) + +interface IFace { + fun call(ic: T): R +} + +fun bar(value: T, f: IFace): R { + return f.call(value) +} + +fun IC.extensionValue(): T = value + +fun normalValue(ic: IC): T = ic.value + +OPTIONAL_JVM_INLINE_ANNOTATION +value class IC(val value: T) { + fun dispatchValue(): T = value +} + +fun box(): String { + var res = underlying(IC(40)) + 2 + if (res != 42) "FAIL 1 $res" + + res = extension(IC(40)) + 3 + if (res != 43) return "FAIL 2: $res" + + res = dispatch(IC(40)) + 4 + if (res != 44) return "FAIL 3: $res" + + res = normal(IC(40)) + 5 + if (res != 45) return "FAIL 4: $res" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt index 72ab52fe699..43bec30b546 100644 --- a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt @@ -3,6 +3,7 @@ // LANGUAGE: +ValueClasses, +GenericInlineClassParameter class BoxT(val boxed: T) +class BoxT2(val boxed: T?) class BoxAny(val boxed: Any?) class BoxFoo(val boxed: IFoo?) @@ -18,14 +19,17 @@ OPTIONAL_JVM_INLINE_ANNOTATION value class StrArr(val value: Array): IFoo fun boxToTypeParameter(x: Str?) = BoxT(x) +fun boxToTypeParameter2(x: Str?) = BoxT2(x) fun boxToNullableAny(x: Str?) = BoxAny(x) fun boxToNullableInterface(x: Str?) = BoxFoo(x) fun > box2ToTypeParameter(x: Str2?) = BoxT(x) +fun > box2ToTypeParameter2(x: Str2?) = BoxT2(x) fun > box2ToNullableAny(x: Str2?) = BoxAny(x) fun > box2ToNullableInterface(x: Str2?) = BoxFoo(x) fun boxArrToTypeParameter(x: StrArr?) = BoxT(x) +fun boxArrToTypeParameter2(x: StrArr?) = BoxT2(x) fun boxArrToNullableAny(x: StrArr?) = BoxAny(x) fun boxArrToNullableInterface(x: StrArr?) = BoxFoo(x) @@ -43,14 +47,17 @@ fun useNullableStrArr(x: StrArr?) { fun box(): String { useNullableStr(boxToTypeParameter(null).boxed) + useNullableStr(boxToTypeParameter2(null).boxed) useNullableStr(boxToNullableAny(null).boxed as Str?) useNullableStr(boxToNullableInterface(null).boxed as Str?) useNullableStr2(box2ToTypeParameter>(null).boxed) + useNullableStr2(box2ToTypeParameter2>(null).boxed) useNullableStr2(box2ToNullableAny>(null).boxed as Str2>?) useNullableStr2(box2ToNullableInterface>(null).boxed as Str2>?) useNullableStrArr(boxArrToTypeParameter(null).boxed) + useNullableStrArr(boxArrToTypeParameter2(null).boxed) useNullableStrArr(boxArrToNullableAny(null).boxed as StrArr?) useNullableStrArr(boxArrToNullableInterface(null).boxed as StrArr?) diff --git a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI.kt b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI.kt index 3d9291f48dc..1e5c1b50f21 100644 --- a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI.kt +++ b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI.kt @@ -1,6 +1,5 @@ // WITH_STDLIB // WORKS_WHEN_VALUE_CLASS -// IGNORE_BACKEND: JVM // LANGUAGE: +ValueClasses, +GenericInlineClassParameter class BoxT(val boxed: T) diff --git a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI2.kt b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI2.kt index ab8f4302374..a7cc5e03e0d 100644 --- a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI2.kt +++ b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI2.kt @@ -1,9 +1,9 @@ // WITH_STDLIB // WORKS_WHEN_VALUE_CLASS -// IGNORE_BACKEND: JVM // LANGUAGE: +ValueClasses, +GenericInlineClassParameter class BoxT(val boxed: T) +class BoxT2(val boxed: T?) class BoxAny(val boxed: Any?) class BoxFoo(val boxed: IFoo?) @@ -18,6 +18,7 @@ OPTIONAL_JVM_INLINE_ANNOTATION value class I32(val value: T?) : IFoo where T: Marker fun boxToTypeParameter(x: I32?) where T: Marker = BoxT(x) +fun boxToTypeParameter2(x: I32?) where T: Marker = BoxT2(x) fun boxToNullableAny(x: I32?) where T: Marker = BoxAny(x) fun boxToNullableInterface(x: I32?) where T: Marker = BoxFoo(x) @@ -27,6 +28,7 @@ fun useNullableI32(x: I32?) where T: Marker { fun box(): String { useNullableI32(boxToTypeParameter(null).boxed) + useNullableI32(boxToTypeParameter2(null).boxed) useNullableI32(boxToNullableAny(null).boxed as I32?) useNullableI32(boxToNullableInterface(null).boxed as I32?) diff --git a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI.kt b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI.kt index a4421920638..2c42ff36874 100644 --- a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI.kt +++ b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI.kt @@ -1,6 +1,5 @@ // WITH_STDLIB // WORKS_WHEN_VALUE_CLASS -// IGNORE_BACKEND: JVM // LANGUAGE: +ValueClasses, +GenericInlineClassParameter class BoxT(val boxed: T) diff --git a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI2.kt b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI2.kt index cd1316131f4..9a2dff896fb 100644 --- a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI2.kt +++ b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI2.kt @@ -1,9 +1,9 @@ // WITH_STDLIB // WORKS_WHEN_VALUE_CLASS -// IGNORE_BACKEND: JVM // LANGUAGE: +ValueClasses, +GenericInlineClassParameter class BoxT(val boxed: T) +class BoxT2(val boxed: T?) class BoxAny(val boxed: Any?) class BoxFoo(val boxed: IFoo?) @@ -13,6 +13,7 @@ OPTIONAL_JVM_INLINE_ANNOTATION value class I32>(val value: T?) : IFoo where T: Int fun > boxToTypeParameter(x: I32?) where T: Int = BoxT(x) +fun > boxToTypeParameter2(x: I32?) where T: Int = BoxT2(x) fun > boxToNullableAny(x: I32?) where T: Int = BoxAny(x) fun > boxToNullableInterface(x: I32?) where T: Int = BoxFoo(x) @@ -21,7 +22,7 @@ fun > useNullableI32(x: I32?) where T: Int { } fun box(): String { - useNullableI32(boxToTypeParameter(null).boxed) + useNullableI32(boxToTypeParameter2(null).boxed) useNullableI32(boxToNullableAny(null).boxed as I32?) useNullableI32(boxToNullableInterface(null).boxed as I32?) diff --git a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt index 0f289dc0515..00e8a1ac68d 100644 --- a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt @@ -1,9 +1,9 @@ // WITH_STDLIB // WORKS_WHEN_VALUE_CLASS -// IGNORE_BACKEND: JVM // LANGUAGE: +ValueClasses, +GenericInlineClassParameter class BoxT(val boxed: T) +class BoxT2(val boxed: T?) class BoxAny(val boxed: Any?) class BoxFoo(val boxed: IFoo?) @@ -13,6 +13,7 @@ OPTIONAL_JVM_INLINE_ANNOTATION value class I32(val value: T?) : IFoo fun boxToTypeParameter(x: I32?) = BoxT(x) +fun boxToTypeParameter2(x: I32?) = BoxT2(x) fun boxToNullableAny(x: I32?) = BoxAny(x) fun boxToNullableInterface(x: I32?) = BoxFoo(x) @@ -22,6 +23,7 @@ fun useNullableI32(x: I32?) { fun box(): String { useNullableI32(boxToTypeParameter(null).boxed) + useNullableI32(boxToTypeParameter2(null).boxed) useNullableI32(boxToNullableAny(null).boxed as I32?) useNullableI32(boxToNullableInterface(null).boxed as I32?) diff --git a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric.kt b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric.kt index e2014b2866b..4132b3f7cac 100644 --- a/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric.kt @@ -3,6 +3,7 @@ // LANGUAGE: +ValueClasses, +GenericInlineClassParameter class BoxT(val boxed: T) +class BoxT2(val boxed: T?) class BoxAny(val boxed: Any?) class BoxFoo(val boxed: IFoo?) @@ -12,6 +13,7 @@ OPTIONAL_JVM_INLINE_ANNOTATION value class I32(val value: T) : IFoo fun boxToTypeParameter(x: I32?) = BoxT(x) +fun boxToTypeParameter2(x: I32?) = BoxT2(x) fun boxToNullableAny(x: I32?) = BoxAny(x) fun boxToNullableInterface(x: I32?) = BoxFoo(x) @@ -21,6 +23,7 @@ fun useNullableI32(x: I32?) { fun box(): String { useNullableI32(boxToTypeParameter(null).boxed) + useNullableI32(boxToTypeParameter2(null).boxed) useNullableI32(boxToNullableAny(null).boxed as I32?) useNullableI32(boxToNullableInterface(null).boxed as I32?) diff --git a/compiler/testData/codegen/box/inlineClasses/unboxParameterOfSuspendLambdaBeforeInvokeGeneric.kt b/compiler/testData/codegen/box/inlineClasses/unboxParameterOfSuspendLambdaBeforeInvokeGeneric.kt index 9fde2b0ea00..4304a3ae029 100644 --- a/compiler/testData/codegen/box/inlineClasses/unboxParameterOfSuspendLambdaBeforeInvokeGeneric.kt +++ b/compiler/testData/codegen/box/inlineClasses/unboxParameterOfSuspendLambdaBeforeInvokeGeneric.kt @@ -16,6 +16,11 @@ value class BoxAny(val value: T) { val intValue: Int get() = value as Int } +OPTIONAL_JVM_INLINE_ANNOTATION +value class BoxAny2(val value: T?) { + val intValue: Int get() = value as Int +} + OPTIONAL_JVM_INLINE_ANNOTATION value class BoxInt(val value: T) @@ -39,6 +44,16 @@ suspend fun fooReceiver(block: suspend BoxAny.() -> Unit) { block.startCoroutineUninterceptedOrReturn(BoxAny(1 as T), EmptyContinuation()) } +suspend fun foo2(block: suspend (BoxAny2) -> Unit) { + block(BoxAny2(11 as T)) + block.startCoroutineUninterceptedOrReturn(BoxAny2(1 as T), EmptyContinuation()) +} + +suspend fun fooReceiver2(block: suspend BoxAny2.() -> Unit) { + BoxAny2(11 as T).block() + block.startCoroutineUninterceptedOrReturn(BoxAny2(1 as T), EmptyContinuation()) +} + suspend fun bar(block: suspend (BoxInt) -> Unit) { block(BoxInt(2 as T)) block.startCoroutineUninterceptedOrReturn(BoxInt(2 as T), EmptyContinuation()) @@ -66,6 +81,13 @@ suspend fun BoxAny.extension(block: suspend BoxAny.() -> Unit) { block.startCoroutineUninterceptedOrReturn(this, EmptyContinuation()) } +suspend fun BoxAny2.extension(block: suspend BoxAny2.() -> Unit) { + this.block() + block() + + block.startCoroutineUninterceptedOrReturn(this, EmptyContinuation()) +} + suspend fun BoxInt.extension(block: suspend BoxInt.() -> Unit) { this.block() block() @@ -100,6 +122,12 @@ fun box(): String { fooReceiver { result += this.intValue } + foo2 { boxAny2 -> + result += boxAny2.intValue + } + fooReceiver2 { + result += this.intValue + } bar { boxInt -> result += boxInt.value @@ -120,6 +148,11 @@ fun box(): String { result += intValue } + val b2 = BoxAny2(42) + b2.extension { + result += intValue + } + val bInt = BoxInt(5) BoxInt(5).extension { result += value + bInt.value @@ -130,5 +163,5 @@ fun box(): String { } } - return if (result == 168) "OK" else "Error: $result" + return if (result == 468) "OK" else "Error: $result" } \ No newline at end of file diff --git a/compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric2.kt b/compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric2.kt new file mode 100644 index 00000000000..79d5f59bf6a --- /dev/null +++ b/compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric2.kt @@ -0,0 +1,24 @@ +// WITH_STDLIB +// WORKS_WHEN_VALUE_CLASS +// LANGUAGE: +ValueClasses, +GenericInlineClassParameter + +OPTIONAL_JVM_INLINE_ANNOTATION +value class NullableInt(private val holder: T?) { + val intValue: Int get() = holder as Int +} + +val prop: ArrayList> = arrayListOf(NullableInt(0)) + +fun box(): String { + val a = prop[0].intValue + if (a != 0) return "Error 1: $a" + + val local = mutableListOf(NullableInt(1)) + val b = local[0].intValue + if (b != 1) return "Error 2: $b" + + prop[0] = NullableInt(2) + if (prop[0].intValue != 2) return "Error 3: ${prop[0].intValue}" + + return "OK" +} diff --git a/compiler/testData/ir/irText/expressions/callableReferences/kt46069.ir.txt b/compiler/testData/ir/irText/expressions/callableReferences/kt46069.ir.txt index 6aea5711d27..6c5257331a6 100644 --- a/compiler/testData/ir/irText/expressions/callableReferences/kt46069.ir.txt +++ b/compiler/testData/ir/irText/expressions/callableReferences/kt46069.ir.txt @@ -87,10 +87,8 @@ FILE fqName: fileName:/kt46069.kt VALUE_PARAMETER ADAPTER_PARAMETER_FOR_CALLABLE_REFERENCE name:p0 index:0 type:kotlin.String? BLOCK_BODY RETURN type=kotlin.Nothing from='local final fun describedAs (p0: kotlin.String?): .ObjectAssert.assertNotNull?>? declared in .assertNotNull' - TYPE_OP type=.ObjectAssert.assertNotNull>? origin=IMPLICIT_CAST typeOperand=.ObjectAssert.assertNotNull>? - CALL 'public final fun describedAs (description: kotlin.String?, vararg args: kotlin.Any?): .ObjectAssert.ObjectAssert>? declared in .ObjectAssert' type=.ObjectAssert.assertNotNull?>? origin=null - $this: GET_VAR 'receiver: .ObjectAssert.assertNotNull?> declared in .assertNotNull.describedAs' type=.ObjectAssert.assertNotNull?> origin=ADAPTED_FUNCTION_REFERENCE - description: GET_VAR 'p0: kotlin.String? declared in .assertNotNull.describedAs' type=kotlin.String? origin=null + CALL 'public final fun describedAs (description: kotlin.String?, vararg args: kotlin.Any?): .ObjectAssert.ObjectAssert>? declared in .ObjectAssert' type=.ObjectAssert.assertNotNull?>? origin=null + $this: GET_VAR 'receiver: .ObjectAssert.assertNotNull?> declared in .assertNotNull.describedAs' type=.ObjectAssert.assertNotNull?> origin=ADAPTED_FUNCTION_REFERENCE + description: GET_VAR 'p0: kotlin.String? declared in .assertNotNull.describedAs' type=kotlin.String? origin=null FUNCTION_REFERENCE 'local final fun describedAs (p0: kotlin.String?): .ObjectAssert.assertNotNull?>? declared in .assertNotNull' type=kotlin.Function1.ObjectAssert.assertNotNull?>?> origin=ADAPTED_FUNCTION_REFERENCE reflectionTarget=public final fun describedAs (description: kotlin.String?, vararg args: kotlin.Any?): .ObjectAssert.ObjectAssert>? declared in .ObjectAssert - $receiver: TYPE_OP type=.ObjectAssert.assertNotNull> origin=IMPLICIT_CAST typeOperand=.ObjectAssert.assertNotNull> - GET_VAR 'val assert: .ObjectAssert.assertNotNull?> [val] declared in .assertNotNull' type=.ObjectAssert.assertNotNull?> origin=null + $receiver: GET_VAR 'val assert: .ObjectAssert.assertNotNull?> [val] declared in .assertNotNull' type=.ObjectAssert.assertNotNull?> origin=null 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 7eb467031c6..192f37c326a 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 @@ -19153,6 +19153,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boundCallableReferencePassedToInlineFunctionGeneric2.kt") + public void testBoundCallableReferencePassedToInlineFunctionGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxImplDoesNotExecuteInSecondaryConstructor.kt") public void testBoxImplDoesNotExecuteInSecondaryConstructor() throws Exception { @@ -19189,6 +19195,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableForFakeOverrideGeneric2.kt") + public void testBoxNullableForFakeOverrideGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingType() throws Exception { @@ -19201,6 +19213,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingType() throws Exception { @@ -19213,6 +19231,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxResultInlineClassOfConstructorCall.kt") public void testBoxResultInlineClassOfConstructorCall() throws Exception { @@ -19225,6 +19249,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxResultInlineClassOfConstructorCallGeneric2.kt") + public void testBoxResultInlineClassOfConstructorCallGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxUnboxInlineClassesWithOperatorsGetSet.kt") public void testBoxUnboxInlineClassesWithOperatorsGetSet() throws Exception { @@ -19273,6 +19303,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("bridgeGenerationWithInlineClassOverAnyGeneric2.kt") + public void testBridgeGenerationWithInlineClassOverAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("bridgesWhenInlineClassImplementsGenericInterface.kt") public void testBridgesWhenInlineClassImplementsGenericInterface() throws Exception { @@ -19495,6 +19531,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("checkUnboxingResultFromTypeVariableGeneric2.kt") + public void testCheckUnboxingResultFromTypeVariableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("classInInlineClassInit.kt") public void testClassInInlineClassInit() throws Exception { @@ -19597,6 +19639,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("crossinlineWithInlineClassInParameterGeneric2.kt") + public void testCrossinlineWithInlineClassInParameterGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("customIterator.kt") public void testCustomIterator() throws Exception { @@ -19723,6 +19771,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("equalityChecksNegatedNullableGeneric2.kt") + public void testEqualityChecksNegatedNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("equalityChecksNegatedPrimitive.kt") public void testEqualityChecksNegatedPrimitive() throws Exception { @@ -19759,6 +19813,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("equalityChecksNullableGeneric2.kt") + public void testEqualityChecksNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("equalityChecksPrimitive.kt") public void testEqualityChecksPrimitive() throws Exception { @@ -19831,6 +19891,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("equalsEvaluationOrderNullableGeneric2.kt") + public void testEqualsEvaluationOrderNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("equalsEvaluationOrderPrimitive.kt") public void testEqualsEvaluationOrderPrimitive() throws Exception { @@ -20407,6 +20473,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("kt27096_nullablePrimitiveGeneric2.kt") + public void testKt27096_nullablePrimitiveGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("kt27096_nullableReference.kt") public void testKt27096_nullableReference() throws Exception { @@ -20419,6 +20491,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("kt27096_nullableReferenceGeneric2.kt") + public void testKt27096_nullableReferenceGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("kt27096_primitive.kt") public void testKt27096_primitive() throws Exception { @@ -20641,6 +20719,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/kt44701_jvmOverloadsGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("kt44701_jvmOverloadsGeneric2.kt") + public void testKt44701_jvmOverloadsGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt44701_jvmOverloadsGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("kt44867.kt") public void testKt44867() throws Exception { @@ -20851,6 +20935,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("nullableWrapperEqualityGeneric2.kt") + public void testNullableWrapperEqualityGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("overrideReturnNothing.kt") public void testOverrideReturnNothing() throws Exception { @@ -20971,6 +21061,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("resultGeneric2.kt") + public void testResultGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("resultInlining.kt") public void testResultInlining() throws Exception { @@ -21247,6 +21343,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("unboxValueOfAnyBeforeMethodInvocationGeneric2.kt") + public void testUnboxValueOfAnyBeforeMethodInvocationGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("useInlineClassesInsideElvisOperator.kt") public void testUseInlineClassesInsideElvisOperator() throws Exception { @@ -21364,6 +21466,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableAnyGeneric2.kt") + public void testBoxNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableAnyNull.kt") public void testBoxNullableAnyNull() throws Exception { @@ -21376,6 +21484,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableAnyNullGeneric2.kt") + public void testBoxNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableInt.kt") public void testBoxNullableInt() throws Exception { @@ -21388,6 +21502,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableIntGeneric2.kt") + public void testBoxNullableIntGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableIntNull.kt") public void testBoxNullableIntNull() throws Exception { @@ -21400,6 +21520,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableIntNullGeneric2.kt") + public void testBoxNullableIntNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableString.kt") public void testBoxNullableString() throws Exception { @@ -21412,6 +21538,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableStringGeneric2.kt") + public void testBoxNullableStringGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableStringNull.kt") public void testBoxNullableStringNull() throws Exception { @@ -21424,6 +21556,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableStringNullGeneric2.kt") + public void testBoxNullableStringNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxString.kt") public void testBoxString() throws Exception { @@ -21494,6 +21632,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("covariantOverrideChainErasedToNullableAnyGeneric2.kt") + public void testCovariantOverrideChainErasedToNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("covariantOverrideErasedToAny.kt") public void testCovariantOverrideErasedToAny() throws Exception { @@ -21602,6 +21746,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("kt28483Generic2.kt") + public void testKt28483Generic2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("kt31585.kt") public void testKt31585() throws Exception { @@ -21663,9 +21813,27 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { } @Test - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } @Test @@ -21674,12 +21842,6 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNull.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } - @Test - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); - } - @Test @TestMetadata("overrideNullableInlineClassWithNonNullAny.kt") public void testOverrideNullableInlineClassWithNonNullAny() throws Exception { @@ -21704,6 +21866,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNull.kt") public void testOverrideNullableInlineClassWithNonNullNullableAnyNull() throws Exception { @@ -21716,6 +21884,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("relatedReturnTypes1a.kt") public void testRelatedReturnTypes1a() throws Exception { @@ -22071,6 +22245,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("int.kt") public void testInt() throws Exception { @@ -22095,6 +22275,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("intNGeneric2.kt") + public void testIntNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("null.kt") public void testNull() throws Exception { @@ -22136,6 +22322,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { public void testStringNGeneric() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + + @Test + @TestMetadata("stringNGeneric2.kt") + public void testStringNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } } } @@ -22744,6 +22936,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("argumentICGeneric2.kt") + public void testArgumentICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("argumentResult.kt") public void testArgumentResult() throws Exception { @@ -22798,6 +22996,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("returnICGeneric2.kt") + public void testReturnICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("returnResult.kt") public void testReturnResult() throws Exception { @@ -23070,6 +23274,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt"); } + @Test + @TestMetadata("simple2.kt") + public void testSimple2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt"); + } + @Test @TestMetadata("upperBound.kt") public void testUpperBound() throws Exception { @@ -24031,6 +24241,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { @@ -24137,6 +24353,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { @@ -24243,6 +24465,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("iface.kt") public void testIface() 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 8a8f17f0e46..c48e569f957 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 @@ -19579,6 +19579,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boundCallableReferencePassedToInlineFunctionGeneric2.kt") + public void testBoundCallableReferencePassedToInlineFunctionGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxImplDoesNotExecuteInSecondaryConstructor.kt") public void testBoxImplDoesNotExecuteInSecondaryConstructor() throws Exception { @@ -19615,6 +19621,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableForFakeOverrideGeneric2.kt") + public void testBoxNullableForFakeOverrideGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingType() throws Exception { @@ -19627,6 +19639,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingType() throws Exception { @@ -19639,6 +19657,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxResultInlineClassOfConstructorCall.kt") public void testBoxResultInlineClassOfConstructorCall() throws Exception { @@ -19651,6 +19675,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxResultInlineClassOfConstructorCallGeneric2.kt") + public void testBoxResultInlineClassOfConstructorCallGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxUnboxInlineClassesWithOperatorsGetSet.kt") public void testBoxUnboxInlineClassesWithOperatorsGetSet() throws Exception { @@ -19699,6 +19729,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("bridgeGenerationWithInlineClassOverAnyGeneric2.kt") + public void testBridgeGenerationWithInlineClassOverAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("bridgesWhenInlineClassImplementsGenericInterface.kt") public void testBridgesWhenInlineClassImplementsGenericInterface() throws Exception { @@ -19921,6 +19957,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("checkUnboxingResultFromTypeVariableGeneric2.kt") + public void testCheckUnboxingResultFromTypeVariableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("classInInlineClassInit.kt") public void testClassInInlineClassInit() throws Exception { @@ -20023,6 +20065,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("crossinlineWithInlineClassInParameterGeneric2.kt") + public void testCrossinlineWithInlineClassInParameterGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("customIterator.kt") public void testCustomIterator() throws Exception { @@ -20149,6 +20197,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("equalityChecksNegatedNullableGeneric2.kt") + public void testEqualityChecksNegatedNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("equalityChecksNegatedPrimitive.kt") public void testEqualityChecksNegatedPrimitive() throws Exception { @@ -20185,6 +20239,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("equalityChecksNullableGeneric2.kt") + public void testEqualityChecksNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("equalityChecksPrimitive.kt") public void testEqualityChecksPrimitive() throws Exception { @@ -20257,6 +20317,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("equalsEvaluationOrderNullableGeneric2.kt") + public void testEqualsEvaluationOrderNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("equalsEvaluationOrderPrimitive.kt") public void testEqualsEvaluationOrderPrimitive() throws Exception { @@ -20851,6 +20917,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("kt27096_nullablePrimitiveGeneric2.kt") + public void testKt27096_nullablePrimitiveGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("kt27096_nullableReference.kt") public void testKt27096_nullableReference() throws Exception { @@ -20863,6 +20935,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("kt27096_nullableReferenceGeneric2.kt") + public void testKt27096_nullableReferenceGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("kt27096_primitive.kt") public void testKt27096_primitive() throws Exception { @@ -21085,6 +21163,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/kt44701_jvmOverloadsGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("kt44701_jvmOverloadsGeneric2.kt") + public void testKt44701_jvmOverloadsGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt44701_jvmOverloadsGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("kt44867.kt") public void testKt44867() throws Exception { @@ -21295,6 +21379,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("nullableWrapperEqualityGeneric2.kt") + public void testNullableWrapperEqualityGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("overrideReturnNothing.kt") public void testOverrideReturnNothing() throws Exception { @@ -21415,6 +21505,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("resultGeneric2.kt") + public void testResultGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("resultInlining.kt") public void testResultInlining() throws Exception { @@ -21691,6 +21787,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("unboxValueOfAnyBeforeMethodInvocationGeneric2.kt") + public void testUnboxValueOfAnyBeforeMethodInvocationGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("useInlineClassesInsideElvisOperator.kt") public void testUseInlineClassesInsideElvisOperator() throws Exception { @@ -21808,6 +21910,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableAnyGeneric2.kt") + public void testBoxNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableAnyNull.kt") public void testBoxNullableAnyNull() throws Exception { @@ -21820,6 +21928,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableAnyNullGeneric2.kt") + public void testBoxNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableInt.kt") public void testBoxNullableInt() throws Exception { @@ -21832,6 +21946,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableIntGeneric2.kt") + public void testBoxNullableIntGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableIntNull.kt") public void testBoxNullableIntNull() throws Exception { @@ -21844,6 +21964,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableIntNullGeneric2.kt") + public void testBoxNullableIntNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableString.kt") public void testBoxNullableString() throws Exception { @@ -21856,6 +21982,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableStringGeneric2.kt") + public void testBoxNullableStringGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxNullableStringNull.kt") public void testBoxNullableStringNull() throws Exception { @@ -21868,6 +22000,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("boxNullableStringNullGeneric2.kt") + public void testBoxNullableStringNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("boxString.kt") public void testBoxString() throws Exception { @@ -21938,6 +22076,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("covariantOverrideChainErasedToNullableAnyGeneric2.kt") + public void testCovariantOverrideChainErasedToNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("covariantOverrideErasedToAny.kt") public void testCovariantOverrideErasedToAny() throws Exception { @@ -22046,6 +22190,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("kt28483Generic2.kt") + public void testKt28483Generic2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("kt31585.kt") public void testKt31585() throws Exception { @@ -22107,9 +22257,27 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes } @Test - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } @Test @@ -22118,12 +22286,6 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNull.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } - @Test - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); - } - @Test @TestMetadata("overrideNullableInlineClassWithNonNullAny.kt") public void testOverrideNullableInlineClassWithNonNullAny() throws Exception { @@ -22148,6 +22310,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNull.kt") public void testOverrideNullableInlineClassWithNonNullNullableAnyNull() throws Exception { @@ -22160,6 +22328,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("relatedReturnTypes1a.kt") public void testRelatedReturnTypes1a() throws Exception { @@ -22515,6 +22689,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("int.kt") public void testInt() throws Exception { @@ -22539,6 +22719,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("intNGeneric2.kt") + public void testIntNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("null.kt") public void testNull() throws Exception { @@ -22580,6 +22766,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes public void testStringNGeneric() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + + @Test + @TestMetadata("stringNGeneric2.kt") + public void testStringNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } } } @@ -23188,6 +23380,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("argumentICGeneric2.kt") + public void testArgumentICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("argumentResult.kt") public void testArgumentResult() throws Exception { @@ -23242,6 +23440,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("returnICGeneric2.kt") + public void testReturnICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("returnResult.kt") public void testReturnResult() throws Exception { @@ -23514,6 +23718,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt"); } + @Test + @TestMetadata("simple2.kt") + public void testSimple2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt"); + } + @Test @TestMetadata("upperBound.kt") public void testUpperBound() throws Exception { @@ -24475,6 +24685,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { @@ -24581,6 +24797,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { @@ -24687,6 +24909,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @Test @TestMetadata("iface.kt") public void testIface() 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 c5bfe1b83ee..4dc549974f7 100644 --- a/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -15908,6 +15908,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("boundCallableReferencePassedToInlineFunctionGeneric2.kt") + public void ignoreBoundCallableReferencePassedToInlineFunctionGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("boxNullableForFakeOverride.kt") public void ignoreBoxNullableForFakeOverride() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverride.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -15983,11 +15988,21 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("kt27096_nullablePrimitiveGeneric2.kt") + public void ignoreKt27096_nullablePrimitiveGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("kt27096_nullableReferenceGeneric.kt") public void ignoreKt27096_nullableReferenceGeneric() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("kt27096_nullableReferenceGeneric2.kt") + public void ignoreKt27096_nullableReferenceGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("kt27096_primitiveGeneric.kt") public void ignoreKt27096_primitiveGeneric() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt27096_primitiveGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -16023,6 +16038,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/kt44701_jvmOverloadsGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("kt44701_jvmOverloadsGeneric2.kt") + public void ignoreKt44701_jvmOverloadsGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt44701_jvmOverloadsGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("kt44867.kt") public void ignoreKt44867() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt44867.kt"); @@ -16038,11 +16058,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/kt45991.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } - @TestMetadata("kt51254.kt") - public void ignoreKt51254() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/kt51254.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); - } - @TestMetadata("mappingOfBoxedFlexibleInlineClassTypeGeneric.kt") public void ignoreMappingOfBoxedFlexibleInlineClassTypeGeneric() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/mappingOfBoxedFlexibleInlineClassTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -16053,6 +16068,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("nullableWrapperEqualityGeneric2.kt") + public void ignoreNullableWrapperEqualityGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("privateConstructorFunInterfaceMultiModuleGeneric.kt") public void ignorePrivateConstructorFunInterfaceMultiModuleGeneric() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/privateConstructorFunInterfaceMultiModuleGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -16088,31 +16108,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/toStringOfUnboxedNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } - @TestMetadata("unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI.kt") - public void ignoreUnboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); - } - - @TestMetadata("unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI2.kt") - public void ignoreUnboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI2() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); - } - - @TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI.kt") - public void ignoreUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); - } - - @TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI2.kt") - public void ignoreUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI2() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); - } - - @TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt") - public void ignoreUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); - } - private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -16165,6 +16160,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("boxNullableForFakeOverrideGeneric2.kt") + public void testBoxNullableForFakeOverrideGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingType() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -16175,6 +16175,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingType() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -16185,6 +16190,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("boxResultInlineClassOfConstructorCall.kt") public void testBoxResultInlineClassOfConstructorCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCall.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -16195,6 +16205,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("boxResultInlineClassOfConstructorCallGeneric2.kt") + public void testBoxResultInlineClassOfConstructorCallGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("boxUnboxInlineClassesWithOperatorsGetSet.kt") public void testBoxUnboxInlineClassesWithOperatorsGetSet() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -16235,6 +16250,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("bridgeGenerationWithInlineClassOverAnyGeneric2.kt") + public void testBridgeGenerationWithInlineClassOverAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("bridgesWhenInlineClassImplementsGenericInterface.kt") public void testBridgesWhenInlineClassImplementsGenericInterface() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/bridgesWhenInlineClassImplementsGenericInterface.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -16420,6 +16440,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("checkUnboxingResultFromTypeVariableGeneric2.kt") + public void testCheckUnboxingResultFromTypeVariableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("classInInlineClassInit.kt") public void testClassInInlineClassInit() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/classInInlineClassInit.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -16500,6 +16525,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("crossinlineWithInlineClassInParameterGeneric2.kt") + public void testCrossinlineWithInlineClassInParameterGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("defaultFunctionsFromAnyForInlineClass.kt") public void testDefaultFunctionsFromAnyForInlineClass() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -16590,6 +16620,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("equalityChecksNegatedNullableGeneric2.kt") + public void testEqualityChecksNegatedNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("equalityChecksNegatedPrimitive.kt") public void testEqualityChecksNegatedPrimitive() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedPrimitive.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -16620,6 +16655,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("equalityChecksNullableGeneric2.kt") + public void testEqualityChecksNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("equalityChecksPrimitive.kt") public void testEqualityChecksPrimitive() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksPrimitive.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -16675,6 +16715,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("equalsEvaluationOrderNullableGeneric2.kt") + public void testEqualsEvaluationOrderNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("equalsEvaluationOrderPrimitive.kt") public void testEqualsEvaluationOrderPrimitive() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderPrimitive.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -17315,6 +17360,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/kt51157.kt"); } + @TestMetadata("kt51254.kt") + public void testKt51254() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt51254.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("kt51353.kt") public void testKt51353() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt51353.kt"); @@ -17505,6 +17555,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("resultGeneric2.kt") + public void testResultGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("resultInlining.kt") public void testResultInlining() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/resultInlining.kt"); @@ -17620,11 +17675,36 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI.kt") + public void testUnboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @TestMetadata("unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI2.kt") + public void testUnboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullableInlineClassUnderlyingTypeGWI2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType.kt") public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingType.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI.kt") + public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI2.kt") + public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGWI2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @TestMetadata("unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt") + public void testUnboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithNullablePrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("unboxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt") public void testUnboxNullableValueOfInlineClassWithPrimitiveUnderlyingType() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/unboxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -17680,6 +17760,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("unboxValueOfAnyBeforeMethodInvocationGeneric2.kt") + public void testUnboxValueOfAnyBeforeMethodInvocationGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("useInlineClassesInsideElvisOperator.kt") public void testUseInlineClassesInsideElvisOperator() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/useInlineClassesInsideElvisOperator.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -17786,6 +17871,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("boxNullableAnyGeneric2.kt") + public void testBoxNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("boxNullableAnyNull.kt") public void testBoxNullableAnyNull() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNull.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -17796,6 +17886,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("boxNullableAnyNullGeneric2.kt") + public void testBoxNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("boxNullableInt.kt") public void testBoxNullableInt() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableInt.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -17806,6 +17901,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("boxNullableIntGeneric2.kt") + public void testBoxNullableIntGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("boxNullableIntNull.kt") public void testBoxNullableIntNull() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNull.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -17816,6 +17916,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("boxNullableIntNullGeneric2.kt") + public void testBoxNullableIntNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("boxNullableString.kt") public void testBoxNullableString() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableString.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -17826,6 +17931,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("boxNullableStringGeneric2.kt") + public void testBoxNullableStringGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("boxNullableStringNull.kt") public void testBoxNullableStringNull() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNull.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -17836,6 +17946,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("boxNullableStringNullGeneric2.kt") + public void testBoxNullableStringNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("boxString.kt") public void testBoxString() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxString.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -17903,6 +18018,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("covariantOverrideChainErasedToNullableAnyGeneric2.kt") + public void testCovariantOverrideChainErasedToNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("covariantOverrideErasedToAny.kt") public void testCovariantOverrideErasedToAny() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideErasedToAny.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -17993,6 +18113,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("kt28483Generic2.kt") + public void testKt28483Generic2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("kt31585.kt") public void testKt31585() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt31585.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -18043,9 +18168,24 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAny.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNull.kt") @@ -18053,11 +18193,6 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNull.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); - } - @TestMetadata("overrideNullableInlineClassWithNonNullAny.kt") public void testOverrideNullableInlineClassWithNonNullAny() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullAny.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -18078,6 +18213,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNull.kt") public void testOverrideNullableInlineClassWithNonNullNullableAnyNull() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNull.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -18088,6 +18228,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("relatedReturnTypes1a.kt") public void testRelatedReturnTypes1a() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/relatedReturnTypes1a.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -18401,6 +18546,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("int.kt") public void testInt() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/int.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -18421,6 +18571,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("intNGeneric2.kt") + public void testIntNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("null.kt") public void testNull() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/null.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); @@ -18455,6 +18610,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes public void testStringNGeneric() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + + @TestMetadata("stringNGeneric2.kt") + public void testStringNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } } } @@ -19023,6 +19183,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("returnICGeneric2.kt") + public void ignoreReturnICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("returnResult.kt") public void ignoreReturnResult() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnResult.kt"); @@ -19050,6 +19215,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("argumentICGeneric2.kt") + public void testArgumentICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("javaSam.kt") public void testJavaSam() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/funInterface/javaSam.kt"); @@ -19295,6 +19465,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt"); } + @TestMetadata("simple2.kt") + public void testSimple2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt"); + } + @TestMetadata("upperBound.kt") public void testUpperBound() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/upperBound.kt"); @@ -20153,6 +20328,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("anyNGeneric2.kt") + public void ignoreAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -20250,6 +20430,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("anyNGeneric2.kt") + public void ignoreAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + private void runTest(String testDataFilePath) throws Exception { KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM, testDataFilePath); } @@ -20347,6 +20532,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); } + @TestMetadata("anyNGeneric2.kt") + public void ignoreAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric2.kt", TransformersFunctions.getReplaceOptionalJvmInlineAnnotationWithReal()); + } + @TestMetadata("nullableResult.kt") public void ignoreNullableResult() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/nullableResult.kt"); diff --git a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/kotlin/descriptorBasedTypeSignatureMapping.kt b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/kotlin/descriptorBasedTypeSignatureMapping.kt index 45e73351e43..02cb3a6c48e 100644 --- a/core/descriptors.jvm/src/org/jetbrains/kotlin/load/kotlin/descriptorBasedTypeSignatureMapping.kt +++ b/core/descriptors.jvm/src/org/jetbrains/kotlin/load/kotlin/descriptorBasedTypeSignatureMapping.kt @@ -13,6 +13,7 @@ import org.jetbrains.kotlin.name.SpecialNames import org.jetbrains.kotlin.resolve.isInlineClass import org.jetbrains.kotlin.types.* import org.jetbrains.kotlin.types.checker.SimpleClassicTypeSystemContext +import org.jetbrains.kotlin.types.typeUtil.makeNullable import org.jetbrains.kotlin.types.typeUtil.replaceArgumentsWithStarProjections import org.jetbrains.kotlin.types.typeUtil.representativeUpperBound import org.jetbrains.kotlin.utils.DO_NOTHING_3 @@ -146,8 +147,10 @@ fun mapType( } descriptor is TypeParameterDescriptor -> { + val upperBound = descriptor.representativeUpperBound val type = mapType( - descriptor.representativeUpperBound, factory, mode, typeMappingConfiguration, + if (kotlinType.isMarkedNullable) upperBound.makeNullable() else upperBound, + factory, mode, typeMappingConfiguration, writeGenericType = DO_NOTHING_3, descriptorTypeWriter = null ) descriptorTypeWriter?.writeTypeVariable(descriptor.getName(), type) 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 28b0334a45c..81ddf821317 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 @@ -14961,6 +14961,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boundCallableReferencePassedToInlineFunctionGeneric2.kt") + public void testBoundCallableReferencePassedToInlineFunctionGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxImplDoesNotExecuteInSecondaryConstructor.kt") public void testBoxImplDoesNotExecuteInSecondaryConstructor() throws Exception { @@ -14997,6 +15003,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableForFakeOverrideGeneric2.kt") + public void testBoxNullableForFakeOverrideGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingType() throws Exception { @@ -15009,6 +15021,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingType() throws Exception { @@ -15021,6 +15039,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxResultInlineClassOfConstructorCall.kt") public void testBoxResultInlineClassOfConstructorCall() throws Exception { @@ -15033,6 +15057,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxResultInlineClassOfConstructorCallGeneric2.kt") + public void testBoxResultInlineClassOfConstructorCallGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxUnboxInlineClassesWithOperatorsGetSet.kt") public void testBoxUnboxInlineClassesWithOperatorsGetSet() throws Exception { @@ -15081,6 +15111,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("bridgeGenerationWithInlineClassOverAnyGeneric2.kt") + public void testBridgeGenerationWithInlineClassOverAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("bridgesWhenInlineClassImplementsGenericInterface.kt") public void testBridgesWhenInlineClassImplementsGenericInterface() throws Exception { @@ -15279,6 +15315,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("checkUnboxingResultFromTypeVariableGeneric2.kt") + public void testCheckUnboxingResultFromTypeVariableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("classInInlineClassInit.kt") public void testClassInInlineClassInit() throws Exception { @@ -15357,6 +15399,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("crossinlineWithInlineClassInParameterGeneric2.kt") + public void testCrossinlineWithInlineClassInParameterGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("customIterator.kt") public void testCustomIterator() throws Exception { @@ -15483,6 +15531,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("equalityChecksNegatedNullableGeneric2.kt") + public void testEqualityChecksNegatedNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("equalityChecksNegatedPrimitive.kt") public void testEqualityChecksNegatedPrimitive() throws Exception { @@ -15519,6 +15573,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("equalityChecksNullableGeneric2.kt") + public void testEqualityChecksNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("equalityChecksPrimitive.kt") public void testEqualityChecksPrimitive() throws Exception { @@ -15591,6 +15651,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("equalsEvaluationOrderNullableGeneric2.kt") + public void testEqualsEvaluationOrderNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("equalsEvaluationOrderPrimitive.kt") public void testEqualsEvaluationOrderPrimitive() throws Exception { @@ -16059,6 +16125,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("kt27096_nullablePrimitiveGeneric2.kt") + public void testKt27096_nullablePrimitiveGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("kt27096_nullableReference.kt") public void testKt27096_nullableReference() throws Exception { @@ -16071,6 +16143,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("kt27096_nullableReferenceGeneric2.kt") + public void testKt27096_nullableReferenceGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("kt27096_primitive.kt") public void testKt27096_primitive() throws Exception { @@ -16419,6 +16497,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("nullableWrapperEqualityGeneric2.kt") + public void testNullableWrapperEqualityGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("overrideReturnNothing.kt") public void testOverrideReturnNothing() throws Exception { @@ -16539,6 +16623,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("resultGeneric2.kt") + public void testResultGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("resultInlining.kt") public void testResultInlining() throws Exception { @@ -16815,6 +16905,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("unboxValueOfAnyBeforeMethodInvocationGeneric2.kt") + public void testUnboxValueOfAnyBeforeMethodInvocationGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("useInlineClassesInsideElvisOperator.kt") public void testUseInlineClassesInsideElvisOperator() throws Exception { @@ -16920,6 +17016,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableAnyGeneric2.kt") + public void testBoxNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableAnyNull.kt") public void testBoxNullableAnyNull() throws Exception { @@ -16932,6 +17034,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableAnyNullGeneric2.kt") + public void testBoxNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableInt.kt") public void testBoxNullableInt() throws Exception { @@ -16944,6 +17052,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableIntGeneric2.kt") + public void testBoxNullableIntGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableIntNull.kt") public void testBoxNullableIntNull() throws Exception { @@ -16956,6 +17070,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableIntNullGeneric2.kt") + public void testBoxNullableIntNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableString.kt") public void testBoxNullableString() throws Exception { @@ -16968,6 +17088,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableStringGeneric2.kt") + public void testBoxNullableStringGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableStringNull.kt") public void testBoxNullableStringNull() throws Exception { @@ -16980,6 +17106,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableStringNullGeneric2.kt") + public void testBoxNullableStringNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxString.kt") public void testBoxString() throws Exception { @@ -17050,6 +17182,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("covariantOverrideChainErasedToNullableAnyGeneric2.kt") + public void testCovariantOverrideChainErasedToNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("covariantOverrideErasedToAny.kt") public void testCovariantOverrideErasedToAny() throws Exception { @@ -17158,6 +17296,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("kt28483Generic2.kt") + public void testKt28483Generic2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("kt31585.kt") public void testKt31585() throws Exception { @@ -17219,9 +17363,27 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { } @Test - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } @Test @@ -17230,12 +17392,6 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } - @Test - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); - } - @Test @TestMetadata("overrideNullableInlineClassWithNonNullAny.kt") public void testOverrideNullableInlineClassWithNonNullAny() throws Exception { @@ -17260,6 +17416,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNull.kt") public void testOverrideNullableInlineClassWithNonNullNullableAnyNull() throws Exception { @@ -17272,6 +17434,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("relatedReturnTypes1a.kt") public void testRelatedReturnTypes1a() throws Exception { @@ -17627,6 +17795,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("int.kt") public void testInt() throws Exception { @@ -17651,6 +17825,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("intNGeneric2.kt") + public void testIntNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("null.kt") public void testNull() throws Exception { @@ -17692,6 +17872,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { public void testStringNGeneric() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + + @Test + @TestMetadata("stringNGeneric2.kt") + public void testStringNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } } } @@ -18192,6 +18378,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("argumentICGeneric2.kt") + public void testArgumentICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("argumentResult.kt") public void testArgumentResult() throws Exception { @@ -18234,6 +18426,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("returnICGeneric2.kt") + public void testReturnICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("returnResult.kt") public void testReturnResult() throws Exception { @@ -18482,6 +18680,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt"); } + @Test + @TestMetadata("simple2.kt") + public void testSimple2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt"); + } + @Test @TestMetadata("upperBound.kt") public void testUpperBound() throws Exception { @@ -19245,6 +19449,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { @@ -19351,6 +19561,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { @@ -19457,6 +19673,12 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("iface.kt") public void testIface() 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 df245476de4..4cacaf0d9da 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 @@ -14925,6 +14925,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boundCallableReferencePassedToInlineFunctionGeneric2.kt") + public void testBoundCallableReferencePassedToInlineFunctionGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxImplDoesNotExecuteInSecondaryConstructor.kt") public void testBoxImplDoesNotExecuteInSecondaryConstructor() throws Exception { @@ -14961,6 +14967,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableForFakeOverrideGeneric2.kt") + public void testBoxNullableForFakeOverrideGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingType() throws Exception { @@ -14973,6 +14985,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingType() throws Exception { @@ -14985,6 +15003,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxResultInlineClassOfConstructorCall.kt") public void testBoxResultInlineClassOfConstructorCall() throws Exception { @@ -14997,6 +15021,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxResultInlineClassOfConstructorCallGeneric2.kt") + public void testBoxResultInlineClassOfConstructorCallGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxUnboxInlineClassesWithOperatorsGetSet.kt") public void testBoxUnboxInlineClassesWithOperatorsGetSet() throws Exception { @@ -15045,6 +15075,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("bridgeGenerationWithInlineClassOverAnyGeneric2.kt") + public void testBridgeGenerationWithInlineClassOverAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("bridgesWhenInlineClassImplementsGenericInterface.kt") public void testBridgesWhenInlineClassImplementsGenericInterface() throws Exception { @@ -15243,6 +15279,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("checkUnboxingResultFromTypeVariableGeneric2.kt") + public void testCheckUnboxingResultFromTypeVariableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("classInInlineClassInit.kt") public void testClassInInlineClassInit() throws Exception { @@ -15321,6 +15363,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("crossinlineWithInlineClassInParameterGeneric2.kt") + public void testCrossinlineWithInlineClassInParameterGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("customIterator.kt") public void testCustomIterator() throws Exception { @@ -15447,6 +15495,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("equalityChecksNegatedNullableGeneric2.kt") + public void testEqualityChecksNegatedNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("equalityChecksNegatedPrimitive.kt") public void testEqualityChecksNegatedPrimitive() throws Exception { @@ -15483,6 +15537,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("equalityChecksNullableGeneric2.kt") + public void testEqualityChecksNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("equalityChecksPrimitive.kt") public void testEqualityChecksPrimitive() throws Exception { @@ -15555,6 +15615,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("equalsEvaluationOrderNullableGeneric2.kt") + public void testEqualsEvaluationOrderNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("equalsEvaluationOrderPrimitive.kt") public void testEqualsEvaluationOrderPrimitive() throws Exception { @@ -16023,6 +16089,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("kt27096_nullablePrimitiveGeneric2.kt") + public void testKt27096_nullablePrimitiveGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("kt27096_nullableReference.kt") public void testKt27096_nullableReference() throws Exception { @@ -16035,6 +16107,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("kt27096_nullableReferenceGeneric2.kt") + public void testKt27096_nullableReferenceGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("kt27096_primitive.kt") public void testKt27096_primitive() throws Exception { @@ -16383,6 +16461,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("nullableWrapperEqualityGeneric2.kt") + public void testNullableWrapperEqualityGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("overrideReturnNothing.kt") public void testOverrideReturnNothing() throws Exception { @@ -16503,6 +16587,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("resultGeneric2.kt") + public void testResultGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("resultInlining.kt") public void testResultInlining() throws Exception { @@ -16779,6 +16869,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("unboxValueOfAnyBeforeMethodInvocationGeneric2.kt") + public void testUnboxValueOfAnyBeforeMethodInvocationGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("useInlineClassesInsideElvisOperator.kt") public void testUseInlineClassesInsideElvisOperator() throws Exception { @@ -16884,6 +16980,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableAnyGeneric2.kt") + public void testBoxNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableAnyNull.kt") public void testBoxNullableAnyNull() throws Exception { @@ -16896,6 +16998,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableAnyNullGeneric2.kt") + public void testBoxNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableInt.kt") public void testBoxNullableInt() throws Exception { @@ -16908,6 +17016,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableIntGeneric2.kt") + public void testBoxNullableIntGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableIntNull.kt") public void testBoxNullableIntNull() throws Exception { @@ -16920,6 +17034,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableIntNullGeneric2.kt") + public void testBoxNullableIntNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableString.kt") public void testBoxNullableString() throws Exception { @@ -16932,6 +17052,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableStringGeneric2.kt") + public void testBoxNullableStringGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxNullableStringNull.kt") public void testBoxNullableStringNull() throws Exception { @@ -16944,6 +17070,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("boxNullableStringNullGeneric2.kt") + public void testBoxNullableStringNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("boxString.kt") public void testBoxString() throws Exception { @@ -17014,6 +17146,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("covariantOverrideChainErasedToNullableAnyGeneric2.kt") + public void testCovariantOverrideChainErasedToNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("covariantOverrideErasedToAny.kt") public void testCovariantOverrideErasedToAny() throws Exception { @@ -17122,6 +17260,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("kt28483Generic2.kt") + public void testKt28483Generic2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("kt31585.kt") public void testKt31585() throws Exception { @@ -17183,9 +17327,27 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { } @Test - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } @Test @@ -17194,12 +17356,6 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } - @Test - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); - } - @Test @TestMetadata("overrideNullableInlineClassWithNonNullAny.kt") public void testOverrideNullableInlineClassWithNonNullAny() throws Exception { @@ -17224,6 +17380,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNull.kt") public void testOverrideNullableInlineClassWithNonNullNullableAnyNull() throws Exception { @@ -17236,6 +17398,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("relatedReturnTypes1a.kt") public void testRelatedReturnTypes1a() throws Exception { @@ -17591,6 +17759,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("int.kt") public void testInt() throws Exception { @@ -17615,6 +17789,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("intNGeneric2.kt") + public void testIntNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("null.kt") public void testNull() throws Exception { @@ -17656,6 +17836,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { public void testStringNGeneric() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + + @Test + @TestMetadata("stringNGeneric2.kt") + public void testStringNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } } } @@ -18156,6 +18342,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("argumentICGeneric2.kt") + public void testArgumentICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("argumentResult.kt") public void testArgumentResult() throws Exception { @@ -18198,6 +18390,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("returnICGeneric2.kt") + public void testReturnICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("returnResult.kt") public void testReturnResult() throws Exception { @@ -18446,6 +18644,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt"); } + @Test + @TestMetadata("simple2.kt") + public void testSimple2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt"); + } + @Test @TestMetadata("upperBound.kt") public void testUpperBound() throws Exception { @@ -19209,6 +19413,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { @@ -19315,6 +19525,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { @@ -19421,6 +19637,12 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { diff --git a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java index 3c2c3b20fed..3d6385db400 100644 --- a/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java +++ b/js/js.tests/tests-gen/org/jetbrains/kotlin/js/testOld/wasm/semantics/IrCodegenBoxWasmTestGenerated.java @@ -12582,6 +12582,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("boundCallableReferencePassedToInlineFunctionGeneric2.kt") + public void testBoundCallableReferencePassedToInlineFunctionGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("boxImplDoesNotExecuteInSecondaryConstructor.kt") public void testBoxImplDoesNotExecuteInSecondaryConstructor() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxImplDoesNotExecuteInSecondaryConstructor.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -12612,6 +12617,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("boxNullableForFakeOverrideGeneric2.kt") + public void testBoxNullableForFakeOverrideGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingType() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -12622,6 +12632,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingType() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -12632,6 +12647,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("boxResultInlineClassOfConstructorCall.kt") public void testBoxResultInlineClassOfConstructorCall() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCall.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -12642,6 +12662,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("boxResultInlineClassOfConstructorCallGeneric2.kt") + public void testBoxResultInlineClassOfConstructorCallGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("boxUnboxInlineClassesWithOperatorsGetSet.kt") public void testBoxUnboxInlineClassesWithOperatorsGetSet() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -12682,6 +12707,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("bridgeGenerationWithInlineClassOverAnyGeneric2.kt") + public void testBridgeGenerationWithInlineClassOverAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("bridgesWhenInlineClassImplementsGenericInterface.kt") public void testBridgesWhenInlineClassImplementsGenericInterface() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/bridgesWhenInlineClassImplementsGenericInterface.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -12847,6 +12877,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("checkUnboxingResultFromTypeVariableGeneric2.kt") + public void testCheckUnboxingResultFromTypeVariableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("classInInlineClassInit.kt") public void testClassInInlineClassInit() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/classInInlineClassInit.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -12912,6 +12947,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("crossinlineWithInlineClassInParameterGeneric2.kt") + public void testCrossinlineWithInlineClassInParameterGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("customIterator.kt") public void testCustomIterator() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/customIterator.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -13017,6 +13057,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("equalityChecksNegatedNullableGeneric2.kt") + public void testEqualityChecksNegatedNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("equalityChecksNegatedPrimitive.kt") public void testEqualityChecksNegatedPrimitive() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedPrimitive.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -13047,6 +13092,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("equalityChecksNullableGeneric2.kt") + public void testEqualityChecksNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("equalityChecksPrimitive.kt") public void testEqualityChecksPrimitive() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksPrimitive.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -13107,6 +13157,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("equalsEvaluationOrderNullableGeneric2.kt") + public void testEqualsEvaluationOrderNullableGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("equalsEvaluationOrderPrimitive.kt") public void testEqualsEvaluationOrderPrimitive() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderPrimitive.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -13497,6 +13552,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("kt27096_nullablePrimitiveGeneric2.kt") + public void testKt27096_nullablePrimitiveGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("kt27096_nullableReference.kt") public void testKt27096_nullableReference() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReference.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -13507,6 +13567,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("kt27096_nullableReferenceGeneric2.kt") + public void testKt27096_nullableReferenceGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("kt27096_primitive.kt") public void testKt27096_primitive() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/kt27096_primitive.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -13797,6 +13862,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("nullableWrapperEqualityGeneric2.kt") + public void testNullableWrapperEqualityGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("overrideReturnNothing.kt") public void testOverrideReturnNothing() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/overrideReturnNothing.kt"); @@ -13897,6 +13967,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("resultGeneric2.kt") + public void testResultGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("resultInlining.kt") public void testResultInlining() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/resultInlining.kt"); @@ -14127,6 +14202,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("unboxValueOfAnyBeforeMethodInvocationGeneric2.kt") + public void testUnboxValueOfAnyBeforeMethodInvocationGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("useInlineClassesInsideElvisOperator.kt") public void testUseInlineClassesInsideElvisOperator() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/useInlineClassesInsideElvisOperator.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14223,6 +14303,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("boxNullableAnyGeneric2.kt") + public void testBoxNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("boxNullableAnyNull.kt") public void testBoxNullableAnyNull() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14233,6 +14318,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("boxNullableAnyNullGeneric2.kt") + public void testBoxNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("boxNullableInt.kt") public void testBoxNullableInt() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableInt.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14243,6 +14333,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("boxNullableIntGeneric2.kt") + public void testBoxNullableIntGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("boxNullableIntNull.kt") public void testBoxNullableIntNull() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14253,6 +14348,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("boxNullableIntNullGeneric2.kt") + public void testBoxNullableIntNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("boxNullableString.kt") public void testBoxNullableString() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableString.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14263,6 +14363,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("boxNullableStringGeneric2.kt") + public void testBoxNullableStringGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("boxNullableStringNull.kt") public void testBoxNullableStringNull() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14273,6 +14378,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("boxNullableStringNullGeneric2.kt") + public void testBoxNullableStringNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("boxString.kt") public void testBoxString() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxString.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14340,6 +14450,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("covariantOverrideChainErasedToNullableAnyGeneric2.kt") + public void testCovariantOverrideChainErasedToNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("covariantOverrideErasedToAny.kt") public void testCovariantOverrideErasedToAny() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideErasedToAny.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14430,6 +14545,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("kt28483Generic2.kt") + public void testKt28483Generic2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("kt31585.kt") public void testKt31585() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt31585.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14480,9 +14600,24 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAny.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNull.kt") @@ -14490,11 +14625,6 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric() throws Exception { - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); - } - @TestMetadata("overrideNullableInlineClassWithNonNullAny.kt") public void testOverrideNullableInlineClassWithNonNullAny() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullAny.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14515,6 +14645,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNull.kt") public void testOverrideNullableInlineClassWithNonNullNullableAnyNull() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14525,6 +14660,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyNullGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("relatedReturnTypes1a.kt") public void testRelatedReturnTypes1a() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/relatedReturnTypes1a.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14838,6 +14978,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("int.kt") public void testInt() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/int.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14858,6 +15003,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("intNGeneric2.kt") + public void testIntNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("null.kt") public void testNull() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/null.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -14892,6 +15042,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest public void testStringNGeneric() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + + @TestMetadata("stringNGeneric2.kt") + public void testStringNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } } } @@ -15349,6 +15504,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("argumentICGeneric2.kt") + public void testArgumentICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("argumentResult.kt") public void testArgumentResult() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentResult.kt"); @@ -15384,6 +15544,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("returnICGeneric2.kt") + public void testReturnICGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("returnResult.kt") public void testReturnResult() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnResult.kt"); @@ -15604,6 +15769,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt"); } + @TestMetadata("simple2.kt") + public void testSimple2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt"); + } + @TestMetadata("upperBound.kt") public void testUpperBound() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/upperBound.kt"); @@ -16315,6 +16485,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/iface.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -16412,6 +16587,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/iface.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -16509,6 +16689,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + } + @TestMetadata("iface.kt") public void testIface() throws Exception { runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); 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 a9bf9ae7c4a..5a70240a8b3 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 @@ -15969,18 +15969,23 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/anySuperCallGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunction.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxImplDoesNotExecuteInSecondaryConstructor.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxImplDoesNotExecuteInSecondaryConstructorGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxImplDoesNotExecuteInitBlock.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxImplDoesNotExecuteInitBlockGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverride.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCall.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSet.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxUnboxInlineClassesWithOperatorsGetSetGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxUnboxOfInlineClassForCapturedVars.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -15989,6 +15994,7 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/bridgeForFunctionReturningInlineClassGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAny.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/bridgesWhenInlineClassImplementsGenericInterface.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/bridgesWhenInlineClassImplementsGenericInterfaceGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/callComputablePropertyInsideInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -16022,6 +16028,7 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/checkLambdaWithInlineClassesInFunctionalTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariable.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/classInInlineClassInit.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/classInInlineClassInitGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/computablePropertyInsideInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -16035,6 +16042,7 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/createInlineClassInArgumentPositionGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameter.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/customIterator.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/defaultFunctionsFromAnyForInlineClassGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -16056,12 +16064,14 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNonNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullable.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedPrimitive.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedPrimitiveGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalityChecksNonNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalityChecksNonNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalityChecksNullable.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalityChecksPrimitive.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalityChecksPrimitiveGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalityForBoxesOfNullableValuesOfInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -16074,6 +16084,7 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNonNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullable.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderPrimitive.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderPrimitiveGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/equalsOperatorWithGenericCall.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -16152,8 +16163,10 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/kt27096_innerClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitive.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReference.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/kt27096_primitive.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/kt27096_primitiveGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/kt27096_reference.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -16203,6 +16216,7 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/nullableEqeqNonNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/nullableWrapperEquality.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/overridingFunCallingPrivateFun.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/overridingFunCallingPrivateFunGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/passInlineClassAsVararg.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -16222,6 +16236,7 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/removeInInlineCollectionOfInlineClassAsInt.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/result.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/resultGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/resultGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/resultRunCatchingOrElse.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/safeAsOfTypeParameterWithInlineClassBound.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/safeAsOfTypeParameterWithInlineClassBoundGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -16265,6 +16280,7 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/unboxValueFromPlatformTypeGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocation.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/useInlineClassesInsideElvisOperator.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/useInlineClassesInsideElvisOperatorGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/useInlineFunctionInsideInlineClass.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -16322,6 +16338,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric.kt"); } + @Test + @TestMetadata("boundCallableReferencePassedToInlineFunctionGeneric2.kt") + public void testBoundCallableReferencePassedToInlineFunctionGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boundCallableReferencePassedToInlineFunctionGeneric2.kt"); + } + @Test @TestMetadata("boxImplDoesNotExecuteInSecondaryConstructor.kt") public void testBoxImplDoesNotExecuteInSecondaryConstructor() throws Exception { @@ -16364,6 +16387,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric.kt"); } + @Test + @TestMetadata("boxNullableForFakeOverrideGeneric2.kt") + public void testBoxNullableForFakeOverrideGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableForFakeOverrideGeneric2.kt"); + } + @Test @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingType() throws Exception { @@ -16378,6 +16408,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric.kt"); } + @Test + @TestMetadata("boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithNonNullUnderlyingTypeGeneric2.kt"); + } + @Test @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingType.kt") public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingType() throws Exception { @@ -16392,6 +16429,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric.kt"); } + @Test + @TestMetadata("boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt") + public void testBoxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxNullableValueOfInlineClassWithPrimitiveUnderlyingTypeGeneric2.kt"); + } + @Test @TestMetadata("boxResultInlineClassOfConstructorCall.kt") public void testBoxResultInlineClassOfConstructorCall() throws Exception { @@ -16406,6 +16450,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric.kt"); } + @Test + @TestMetadata("boxResultInlineClassOfConstructorCallGeneric2.kt") + public void testBoxResultInlineClassOfConstructorCallGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxResultInlineClassOfConstructorCallGeneric2.kt"); + } + @Test @TestMetadata("boxUnboxInlineClassesWithOperatorsGetSet.kt") public void testBoxUnboxInlineClassesWithOperatorsGetSet() throws Exception { @@ -16462,6 +16513,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric.kt"); } + @Test + @TestMetadata("bridgeGenerationWithInlineClassOverAnyGeneric2.kt") + public void testBridgeGenerationWithInlineClassOverAnyGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/bridgeGenerationWithInlineClassOverAnyGeneric2.kt"); + } + @Test @TestMetadata("bridgesWhenInlineClassImplementsGenericInterface.kt") public void testBridgesWhenInlineClassImplementsGenericInterface() throws Exception { @@ -16693,6 +16751,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric.kt"); } + @Test + @TestMetadata("checkUnboxingResultFromTypeVariableGeneric2.kt") + public void testCheckUnboxingResultFromTypeVariableGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/checkUnboxingResultFromTypeVariableGeneric2.kt"); + } + @Test @TestMetadata("classInInlineClassInit.kt") public void testClassInInlineClassInit() throws Exception { @@ -16784,6 +16849,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric.kt"); } + @Test + @TestMetadata("crossinlineWithInlineClassInParameterGeneric2.kt") + public void testCrossinlineWithInlineClassInParameterGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/crossinlineWithInlineClassInParameterGeneric2.kt"); + } + @Test @TestMetadata("customIterator.kt") public void testCustomIterator() throws Exception { @@ -16931,6 +17003,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric.kt"); } + @Test + @TestMetadata("equalityChecksNegatedNullableGeneric2.kt") + public void testEqualityChecksNegatedNullableGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNegatedNullableGeneric2.kt"); + } + @Test @TestMetadata("equalityChecksNegatedPrimitive.kt") public void testEqualityChecksNegatedPrimitive() throws Exception { @@ -16973,6 +17052,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric.kt"); } + @Test + @TestMetadata("equalityChecksNullableGeneric2.kt") + public void testEqualityChecksNullableGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/equalityChecksNullableGeneric2.kt"); + } + @Test @TestMetadata("equalityChecksPrimitive.kt") public void testEqualityChecksPrimitive() throws Exception { @@ -17057,6 +17143,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric.kt"); } + @Test + @TestMetadata("equalsEvaluationOrderNullableGeneric2.kt") + public void testEqualsEvaluationOrderNullableGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/equalsEvaluationOrderNullableGeneric2.kt"); + } + @Test @TestMetadata("equalsEvaluationOrderPrimitive.kt") public void testEqualsEvaluationOrderPrimitive() throws Exception { @@ -17603,6 +17696,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric.kt"); } + @Test + @TestMetadata("kt27096_nullablePrimitiveGeneric2.kt") + public void testKt27096_nullablePrimitiveGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullablePrimitiveGeneric2.kt"); + } + @Test @TestMetadata("kt27096_nullableReference.kt") public void testKt27096_nullableReference() throws Exception { @@ -17617,6 +17717,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric.kt"); } + @Test + @TestMetadata("kt27096_nullableReferenceGeneric2.kt") + public void testKt27096_nullableReferenceGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/kt27096_nullableReferenceGeneric2.kt"); + } + @Test @TestMetadata("kt27096_primitive.kt") public void testKt27096_primitive() throws Exception { @@ -18014,6 +18121,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric.kt"); } + @Test + @TestMetadata("nullableWrapperEqualityGeneric2.kt") + public void testNullableWrapperEqualityGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/nullableWrapperEqualityGeneric2.kt"); + } + @Test @TestMetadata("overrideReturnNothing.kt") public void testOverrideReturnNothing() throws Exception { @@ -18153,6 +18267,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric.kt"); } + @Test + @TestMetadata("resultGeneric2.kt") + public void testResultGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/resultGeneric2.kt"); + } + @Test @TestMetadata("resultInlining.kt") public void testResultInlining() throws Exception { @@ -18472,6 +18593,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric.kt"); } + @Test + @TestMetadata("unboxValueOfAnyBeforeMethodInvocationGeneric2.kt") + public void testUnboxValueOfAnyBeforeMethodInvocationGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/unboxValueOfAnyBeforeMethodInvocationGeneric2.kt"); + } + @Test @TestMetadata("useInlineClassesInsideElvisOperator.kt") public void testUseInlineClassesInsideElvisOperator() throws Exception { @@ -18543,16 +18671,22 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxIntGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAny.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableInt.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableString.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxString.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxStringGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } @@ -18618,6 +18752,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric.kt"); } + @Test + @TestMetadata("boxNullableAnyGeneric2.kt") + public void testBoxNullableAnyGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyGeneric2.kt"); + } + @Test @TestMetadata("boxNullableAnyNull.kt") public void testBoxNullableAnyNull() throws Exception { @@ -18632,6 +18773,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric.kt"); } + @Test + @TestMetadata("boxNullableAnyNullGeneric2.kt") + public void testBoxNullableAnyNullGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableAnyNullGeneric2.kt"); + } + @Test @TestMetadata("boxNullableInt.kt") public void testBoxNullableInt() throws Exception { @@ -18646,6 +18794,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric.kt"); } + @Test + @TestMetadata("boxNullableIntGeneric2.kt") + public void testBoxNullableIntGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntGeneric2.kt"); + } + @Test @TestMetadata("boxNullableIntNull.kt") public void testBoxNullableIntNull() throws Exception { @@ -18660,6 +18815,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric.kt"); } + @Test + @TestMetadata("boxNullableIntNullGeneric2.kt") + public void testBoxNullableIntNullGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableIntNullGeneric2.kt"); + } + @Test @TestMetadata("boxNullableString.kt") public void testBoxNullableString() throws Exception { @@ -18674,6 +18836,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric.kt"); } + @Test + @TestMetadata("boxNullableStringGeneric2.kt") + public void testBoxNullableStringGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringGeneric2.kt"); + } + @Test @TestMetadata("boxNullableStringNull.kt") public void testBoxNullableStringNull() throws Exception { @@ -18688,6 +18857,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric.kt"); } + @Test + @TestMetadata("boxNullableStringNullGeneric2.kt") + public void testBoxNullableStringNullGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueInLambda/boxNullableStringNullGeneric2.kt"); + } + @Test @TestMetadata("boxString.kt") public void testBoxString() throws Exception { @@ -18728,6 +18904,7 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAny.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideErasedToAny.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideErasedToAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideErasedToInterface.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -18746,6 +18923,7 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/inlineClassInOverriddenReturnTypesGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt31585.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt31585Generic.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt35234.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -18756,15 +18934,19 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullAny.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAny.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); - register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); - register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullAny.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAny.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNull.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/relatedReturnTypes1a.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/relatedReturnTypes1aGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/relatedReturnTypes1b.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -18826,6 +19008,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric.kt"); } + @Test + @TestMetadata("covariantOverrideChainErasedToNullableAnyGeneric2.kt") + public void testCovariantOverrideChainErasedToNullableAnyGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/covariantOverrideChainErasedToNullableAnyGeneric2.kt"); + } + @Test @TestMetadata("covariantOverrideErasedToAny.kt") public void testCovariantOverrideErasedToAny() throws Exception { @@ -18952,6 +19141,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic.kt"); } + @Test + @TestMetadata("kt28483Generic2.kt") + public void testKt28483Generic2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/kt28483Generic2.kt"); + } + @Test @TestMetadata("kt31585.kt") public void testKt31585() throws Exception { @@ -19023,10 +19219,31 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest } @Test - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric() throws Exception { + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG() throws Exception { // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyGeneric.kt"); + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG.kt"); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyG2.kt"); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG.kt"); + } + + @Test + @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt") + public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNG2.kt"); } @Test @@ -19036,13 +19253,6 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNull.kt"); } - @Test - @TestMetadata("overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt") - public void testOverrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric() throws Exception { - // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() - runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideGenericWithNullableInlineClassUpperBoundWithNonNullNullableAnyNullGeneric.kt"); - } - @Test @TestMetadata("overrideNullableInlineClassWithNonNullAny.kt") public void testOverrideNullableInlineClassWithNonNullAny() throws Exception { @@ -19071,6 +19281,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric.kt"); } + @Test + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyGeneric2.kt"); + } + @Test @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNull.kt") public void testOverrideNullableInlineClassWithNonNullNullableAnyNull() throws Exception { @@ -19085,6 +19302,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric.kt"); } + @Test + @TestMetadata("overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt") + public void testOverrideNullableInlineClassWithNonNullNullableAnyNullGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/boxReturnValueOnOverride/overrideNullableInlineClassWithNonNullNullableAnyNullGeneric2.kt"); + } + @Test @TestMetadata("relatedReturnTypes1a.kt") public void testRelatedReturnTypes1a() throws Exception { @@ -19515,16 +19739,19 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyN.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/int.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intN.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/null.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/nullGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/string.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringN.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } @Test @@ -19560,6 +19787,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric.kt"); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/anyNGeneric2.kt"); + } + @Test @TestMetadata("int.kt") public void testInt() throws Exception { @@ -19588,6 +19822,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric.kt"); } + @Test + @TestMetadata("intNGeneric2.kt") + public void testIntNGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/intNGeneric2.kt"); + } + @Test @TestMetadata("null.kt") public void testNull() throws Exception { @@ -19635,6 +19876,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric.kt"); } + + @Test + @TestMetadata("stringNGeneric2.kt") + public void testStringNGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/callableReferences/let/stringNGeneric2.kt"); + } } } @@ -20269,12 +20517,14 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest public FunInterface() { register("compiler/testData/codegen/box/inlineClasses/funInterface/argumentIC.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/funInterface/kt51121.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/funInterface/kt51121_2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/funInterface/mangledSamWrappers.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/funInterface/mangledSamWrappersGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/funInterface/returnIC.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); } @Test @@ -20296,6 +20546,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric.kt"); } + @Test + @TestMetadata("argumentICGeneric2.kt") + public void testArgumentICGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/argumentICGeneric2.kt"); + } + @Test @TestMetadata("argumentResult.kt") public void testArgumentResult() throws Exception { @@ -20344,6 +20601,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric.kt"); } + @Test + @TestMetadata("returnICGeneric2.kt") + public void testReturnICGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/funInterface/returnICGeneric2.kt"); + } + @Test @TestMetadata("returnResult.kt") public void testReturnResult() throws Exception { @@ -20663,6 +20927,12 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple.kt"); } + @Test + @TestMetadata("simple2.kt") + public void testSimple2() throws Exception { + runTest("compiler/testData/codegen/box/inlineClasses/genericUnderlyingValue/simple2.kt"); + } + @Test @TestMetadata("upperBound.kt") public void testUpperBound() throws Exception { @@ -21617,6 +21887,7 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyN.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/iface.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/ifaceChild.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/ifaceChildGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -21662,6 +21933,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric.kt"); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/funInterface/anyNGeneric2.kt"); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { @@ -21756,6 +22034,7 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyN.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/iface.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/ifaceChild.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/ifaceChildGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -21801,6 +22080,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric.kt"); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/lambda/anyNGeneric2.kt"); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception { @@ -21895,6 +22181,7 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyN.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); + register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric2.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/iface.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChild.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); register("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/ifaceChildGeneric.kt", TransformersFunctions.getRemoveOptionalJvmInlineAnnotation()); @@ -21940,6 +22227,13 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric.kt"); } + @Test + @TestMetadata("anyNGeneric2.kt") + public void testAnyNGeneric2() throws Exception { + // There is a registered source transformer for the testcase: TransformersFunctions.getRemoveOptionalJvmInlineAnnotation() + runTest("compiler/testData/codegen/box/inlineClasses/unboxGenericParameter/objectLiteral/anyNGeneric2.kt"); + } + @Test @TestMetadata("iface.kt") public void testIface() throws Exception {