[tests] BI (1P&1TV/1TIO): add tests for target types

single builder parameter
single postponed type variable
single origin of type information

relevant issues:
KT-60719
KT-60720
KT-60855
KT-60877
KT-60880
This commit is contained in:
Stanislav Ruban
2023-08-02 11:53:42 +03:00
committed by Space Team
parent bfe54942d3
commit 44a4c4ee1c
64 changed files with 6518 additions and 0 deletions
@@ -3424,6 +3424,40 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("FunctionWithParameterToUnitImplicitLiteralsCase.kt")
public void testFunctionWithParameterToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnitImplicitLiteralsCase.kt")
public void testFunctionWithReceiverToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("NothingMaterializeCase.kt")
public void testNothingMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingMaterializeCase.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralMaterializeCase.kt")
public void testNullableNothingNullLiteralMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralMaterializeCase.kt");
}
}
}
}
}
@@ -3424,6 +3424,40 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("FunctionWithParameterToUnitImplicitLiteralsCase.kt")
public void testFunctionWithParameterToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnitImplicitLiteralsCase.kt")
public void testFunctionWithReceiverToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("NothingMaterializeCase.kt")
public void testNothingMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingMaterializeCase.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralMaterializeCase.kt")
public void testNullableNothingNullLiteralMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralMaterializeCase.kt");
}
}
}
}
}
@@ -3424,6 +3424,40 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("FunctionWithParameterToUnitImplicitLiteralsCase.kt")
public void testFunctionWithParameterToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnitImplicitLiteralsCase.kt")
public void testFunctionWithReceiverToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("NothingMaterializeCase.kt")
public void testNothingMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingMaterializeCase.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralMaterializeCase.kt")
public void testNullableNothingNullLiteralMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralMaterializeCase.kt");
}
}
}
}
}
@@ -3430,6 +3430,40 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("FunctionWithParameterToUnitImplicitLiteralsCase.kt")
public void testFunctionWithParameterToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnitImplicitLiteralsCase.kt")
public void testFunctionWithReceiverToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("NothingMaterializeCase.kt")
public void testNothingMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingMaterializeCase.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralMaterializeCase.kt")
public void testNullableNothingNullLiteralMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralMaterializeCase.kt");
}
}
}
}
}
@@ -2833,6 +2833,232 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -2833,6 +2833,232 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -0,0 +1,115 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = reference as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
private var reference: Any? = null
val <T> Buildee<T>.typeArgumentValue: T get() = reference as T
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testAnonymousObjectOutsideBuilderArgument() {
val obj = object {}
reference = obj
val buildee = build {
yield(obj)
}
checkTypeEquality(obj, buildee.typeArgumentValue)
}
fun testAnonymousObjectInsideBuilderArgument() {
val buildee = build {
val obj = object { fun anonOnlyFunc() {} }
reference = obj
yield(obj)
}
buildee.typeArgumentValue.anonOnlyFunc()
}
fun testThisExpression() {
val buildee = build {
val obj = object {
fun anonOnlyFunc() {}
fun initialize() {
reference = this
yield(this)
}
}
obj.initialize()
}
buildee.typeArgumentValue.anonOnlyFunc()
}
testAnonymousObjectOutsideBuilderArgument()
testAnonymousObjectInsideBuilderArgument()
testThisExpression()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testAnonymousObjectOutsideBuilderArgument() {
val obj = object {}
reference = obj
val buildee = build {
fun <T> shareTypeInfo(from: T, to: T) {}
shareTypeInfo(obj, materialize())
}
checkTypeEquality(obj, buildee.typeArgumentValue)
}
fun testAnonymousObjectInsideBuilderArgument() {
val buildee = build {
val obj = object { fun anonOnlyFunc() {} }
reference = obj
fun <T> shareTypeInfo(from: T, to: T) {}
shareTypeInfo(obj, materialize())
}
buildee.typeArgumentValue.anonOnlyFunc()
}
fun testThisExpression() {
val buildee = build {
val obj = object {
fun anonOnlyFunc() {}
fun initialize() {
reference = this
fun <T> shareTypeInfo(from: T, to: T) {}
shareTypeInfo(this, materialize())
}
}
obj.initialize()
}
buildee.typeArgumentValue.anonOnlyFunc()
}
testAnonymousObjectOutsideBuilderArgument()
testAnonymousObjectInsideBuilderArgument()
testThisExpression()
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,47 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = UserKlass() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass
class Context<T> {
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: T & Any = UserKlass() as (T & Any)
val buildee = build {
yield(arg)
}
checkExactType<Buildee<T & Any>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: T & Any) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<T & Any>>(buildee)
}
}
fun box(): String {
with(Context<UserKlass?>()) {
testYield()
testMaterialize()
}
return "OK"
}
@@ -0,0 +1,70 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = UserKlass() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass {
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: UserKlass = UserKlass()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<UserKlass>>(buildee)
}
fun testThisExpression() {
val buildee = build {
yield(this@UserKlass)
}
checkExactType<Buildee<UserKlass>>(buildee)
}
testBasicCase()
testThisExpression()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: UserKlass) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<UserKlass>>(buildee)
}
fun testThisExpression() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(this@UserKlass, materialize())
}
checkExactType<Buildee<UserKlass>>(buildee)
}
testBasicCase()
testThisExpression()
}
}
fun box(): String {
with(UserKlass()) {
testYield()
testMaterialize()
}
return "OK"
}
@@ -0,0 +1,52 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = reference as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
private var reference: Any? = null
val <T> Buildee<T>.typeArgumentValue: T get() = reference as T
enum class UserEnumeration {
ENUM_ENTRY {
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val buildee = build {
yield(this@ENUM_ENTRY)
}
checkTypeEquality(this@ENUM_ENTRY, buildee.typeArgumentValue)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
val buildee = build {
fun <T> shareTypeInfo(from: T, to: T) {}
shareTypeInfo(this@ENUM_ENTRY, materialize())
}
checkTypeEquality(this@ENUM_ENTRY, buildee.typeArgumentValue)
}
init {
reference = this@ENUM_ENTRY
testYield()
testMaterialize()
}
};
}
fun box(): String {
UserEnumeration.ENUM_ENTRY
return "OK"
}
@@ -0,0 +1,72 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = UserEnumeration.ENUM_ENTRY as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
enum class UserEnumeration {
ENUM_ENTRY;
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: UserEnumeration = ENUM_ENTRY
val buildee = build {
yield(arg)
}
checkExactType<Buildee<UserEnumeration>>(buildee)
}
fun testThisExpression() {
val buildee = build {
yield(this@UserEnumeration)
}
checkExactType<Buildee<UserEnumeration>>(buildee)
}
testBasicCase()
testThisExpression()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: UserEnumeration) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<UserEnumeration>>(buildee)
}
fun testThisExpression() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(this@UserEnumeration, materialize())
}
checkExactType<Buildee<UserEnumeration>>(buildee)
}
testBasicCase()
testThisExpression()
}
}
fun box(): String {
with(UserEnumeration.ENUM_ENTRY) {
testYield()
testMaterialize()
}
return "OK"
}
@@ -0,0 +1,74 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = UserKlass().Inner<Placeholder>() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass {
inner class Inner<T> {
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: UserKlass.Inner<T> = UserKlass().Inner()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<UserKlass.Inner<T>>>(buildee)
}
fun testThisExpression() {
val buildee = build {
yield(this@Inner)
}
checkExactType<Buildee<UserKlass.Inner<T>>>(buildee)
}
testBasicCase()
testThisExpression()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: UserKlass.Inner<T>) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<UserKlass.Inner<T>>>(buildee)
}
fun testThisExpression() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(this@Inner, materialize())
}
checkExactType<Buildee<UserKlass.Inner<T>>>(buildee)
}
testBasicCase()
testThisExpression()
}
}
}
class Placeholder
fun box(): String {
with(UserKlass().Inner<Placeholder>()) {
testYield()
testMaterialize()
}
return "OK"
}
@@ -0,0 +1,72 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = UserKlass<Placeholder>() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass<T> {
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: UserKlass<T> = UserKlass()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<UserKlass<T>>>(buildee)
}
fun testThisExpression() {
val buildee = build {
yield(this@UserKlass)
}
checkExactType<Buildee<UserKlass<T>>>(buildee)
}
testBasicCase()
testThisExpression()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: UserKlass<T>) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<UserKlass<T>>>(buildee)
}
fun testThisExpression() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(this@UserKlass, materialize())
}
checkExactType<Buildee<UserKlass<T>>>(buildee)
}
testBasicCase()
testThisExpression()
}
}
class Placeholder
fun box(): String {
with(UserKlass<Placeholder>()) {
testYield()
testMaterialize()
}
return "OK"
}
@@ -0,0 +1,74 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = UserKlass<Placeholder>().Inner() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass<T> {
inner class Inner {
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: UserKlass<T>.Inner = UserKlass<T>().Inner()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<UserKlass<T>.Inner>>(buildee)
}
fun testThisExpression() {
val buildee = build {
yield(this@Inner)
}
checkExactType<Buildee<UserKlass<T>.Inner>>(buildee)
}
testBasicCase()
testThisExpression()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: UserKlass<T>.Inner) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<UserKlass<T>.Inner>>(buildee)
}
fun testThisExpression() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(this@Inner, materialize())
}
checkExactType<Buildee<UserKlass<T>.Inner>>(buildee)
}
testBasicCase()
testThisExpression()
}
}
}
class Placeholder
fun box(): String {
with(UserKlass<Placeholder>().Inner()) {
testYield()
testMaterialize()
}
return "OK"
}
@@ -0,0 +1,72 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = UserKlass().Inner() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass {
inner class Inner {
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: UserKlass.Inner = UserKlass().Inner()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<UserKlass.Inner>>(buildee)
}
fun testThisExpression() {
val buildee = build {
yield(this@Inner)
}
checkExactType<Buildee<UserKlass.Inner>>(buildee)
}
testBasicCase()
testThisExpression()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: UserKlass.Inner) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<UserKlass.Inner>>(buildee)
}
fun testThisExpression() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(this@Inner, materialize())
}
checkExactType<Buildee<UserKlass.Inner>>(buildee)
}
testBasicCase()
testThisExpression()
}
}
}
fun box(): String {
with(UserKlass().Inner()) {
testYield()
testMaterialize()
}
return "OK"
}
@@ -0,0 +1,70 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = UserEnumeration.ENUM_ENTRY as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
enum class UserEnumeration {
ENUM_ENTRY
}
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: UserEnumeration = UserEnumeration.ENUM_ENTRY
val buildee = build {
yield(arg)
}
checkExactType<Buildee<UserEnumeration>>(buildee)
}
fun testEnumEntry() {
val buildee = build {
yield(UserEnumeration.ENUM_ENTRY)
}
checkExactType<Buildee<UserEnumeration>>(buildee)
}
testBasicCase()
testEnumEntry()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: UserEnumeration) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<UserEnumeration>>(buildee)
}
fun testEnumEntry() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(UserEnumeration.ENUM_ENTRY, materialize())
}
checkExactType<Buildee<UserEnumeration>>(buildee)
}
testBasicCase()
testEnumEntry()
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,46 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = UserKlass().Inner<Placeholder>() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass {
inner class Inner<T>
}
class Placeholder
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: UserKlass.Inner<Placeholder> = UserKlass().Inner()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<UserKlass.Inner<Placeholder>>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: UserKlass.Inner<Placeholder>) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<UserKlass.Inner<Placeholder>>>(buildee)
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,91 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = { _: UserKlass -> } as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: (UserKlass) -> Unit = { _: UserKlass -> }
val buildee = build {
yield(arg)
}
checkExactType<Buildee<(UserKlass) -> Unit>>(buildee)
}
fun testExplicitlyUnaryLiterals() {
fun test1() {
val buildee = build {
yield { _: UserKlass -> }
}
checkExactType<Buildee<(UserKlass) -> Unit>>(buildee)
}
fun test2() {
val buildee = build {
yield(fun(_: UserKlass) {})
}
checkExactType<Buildee<(UserKlass) -> Unit>>(buildee)
}
test1()
test2()
}
testBasicCase()
testExplicitlyUnaryLiterals()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: (UserKlass) -> Unit) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<(UserKlass) -> Unit>>(buildee)
}
fun testExplicitlyUnaryLiterals() {
fun test1() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo({ _: UserKlass -> }, materialize())
}
checkExactType<Buildee<(UserKlass) -> Unit>>(buildee)
}
fun test2() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(fun(_: UserKlass) {}, materialize())
}
checkExactType<Buildee<(UserKlass) -> Unit>>(buildee)
}
test1()
test2()
}
testBasicCase()
testExplicitlyUnaryLiterals()
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,68 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = fun UserKlass.() {} as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: UserKlass.() -> Unit = fun UserKlass.() {}
val buildee = build {
yield(arg)
}
checkExactType<Buildee<UserKlass.() -> Unit>>(buildee)
}
fun testLiteralWithExplicitlyPresentReceiver() {
val buildee = build {
yield(fun UserKlass.() {})
}
checkExactType<Buildee<UserKlass.() -> Unit>>(buildee)
}
testBasicCase()
testLiteralWithExplicitlyPresentReceiver()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: UserKlass.() -> Unit) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<UserKlass.() -> Unit>>(buildee)
}
fun testLiteralWithExplicitlyPresentReceiver() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(fun UserKlass.() {}, materialize())
}
checkExactType<Buildee<UserKlass.() -> Unit>>(buildee)
}
testBasicCase()
testLiteralWithExplicitlyPresentReceiver()
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,124 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = reference as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
private var reference: Any? = null
val <T> Buildee<T>.typeArgumentValue: T get() = reference as T
class UserKlass
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testLocalClassOutsideBuilderArgument() {
class Local<T>
reference = Local<UserKlass>()
val arg: Local<UserKlass> = Local()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<Local<UserKlass>>>(buildee)
}
fun testLocalClassInsideBuilderArgument() {
val buildee = build {
class Local<T> { fun localOnlyFunc(): T = UserKlass() as T }
reference = Local<UserKlass>()
val arg: Local<UserKlass> = Local()
yield(arg)
}
val result = buildee.typeArgumentValue.localOnlyFunc()
checkExactType<UserKlass>(result)
}
fun testTypeInfoOriginInsideLocalClass() {
val buildee = build {
class Local<T> {
fun localOnlyFunc(): T = UserKlass() as T
fun initialize() {
reference = Local<UserKlass>()
val arg: Local<UserKlass> = Local()
yield(arg)
}
}
Local<UserKlass>().initialize()
}
val result = buildee.typeArgumentValue.localOnlyFunc()
checkExactType<UserKlass>(result)
}
testLocalClassOutsideBuilderArgument()
testLocalClassInsideBuilderArgument()
testTypeInfoOriginInsideLocalClass()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testLocalClassOutsideBuilderArgument() {
class Local<T>
reference = Local<UserKlass>()
fun consume(arg: Local<UserKlass>) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<Local<UserKlass>>>(buildee)
}
fun testLocalClassInsideBuilderArgument() {
val buildee = build {
class Local<T> { fun localOnlyFunc(): T = UserKlass() as T }
reference = Local<UserKlass>()
fun consume(arg: Local<UserKlass>) {}
consume(materialize())
}
val result = buildee.typeArgumentValue.localOnlyFunc()
checkExactType<UserKlass>(result)
}
fun testTypeInfoOriginInsideLocalClass() {
val buildee = build {
class Local<T> {
fun localOnlyFunc(): T = UserKlass() as T
fun initialize() {
reference = Local<UserKlass>()
fun consume(arg: Local<UserKlass>) {}
consume(materialize())
}
}
Local<UserKlass>().initialize()
}
val result = buildee.typeArgumentValue.localOnlyFunc()
checkExactType<UserKlass>(result)
}
testLocalClassOutsideBuilderArgument()
testLocalClassInsideBuilderArgument()
testTypeInfoOriginInsideLocalClass()
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,119 @@
// IGNORE_BACKEND: JVM
/* ^ code compiled by legacy JVM backend fails in run-time with
* NoSuchMethodError: GenericLocalClassWithLeakingTypeParameterKt$testYield$1$buildee$1$Local: method <init>()V not found
*/
// ISSUE: KT-60855
/* ATTENTION:
* this test monitors an unfixed compiler bug;
* if the behavior of the test changes, please consult with the linked YT ticket
* to check whether the described problem has been fixed by your changes;
* if the issue isn't actually fixed but new behavior persists,
* please add a comment about the behavior change to the ticket
* (preferably accompanied by an analysis of the change's reasons)
*/
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = reference as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
private var reference: Any? = null
val <T> Buildee<T>.typeArgumentValue: T get() = reference as T
class UserKlass
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testTypeInfoOriginInsideLocalClass() {
val buildee = build {
class Local<T> {
fun localOnlyFunc(): T = UserKlass() as T
fun initialize() {
reference = Local<T>()
val arg: Local<T> = Local()
yield(arg)
}
}
Local<UserKlass>().initialize()
}
val result = buildee.typeArgumentValue.localOnlyFunc()
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>result<!>
}
fun testThisExpression() {
val buildee = build {
class Local<T> {
fun localOnlyFunc(): T = UserKlass() as T
fun initialize() {
reference = this
yield(this)
}
}
Local<UserKlass>().initialize()
}
val result = buildee.typeArgumentValue.localOnlyFunc()
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>result<!>
}
testTypeInfoOriginInsideLocalClass()
testThisExpression()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testTypeInfoOriginInsideLocalClass() {
val buildee = build {
class Local<T> {
fun localOnlyFunc(): T = UserKlass() as T
fun initialize() {
reference = Local<T>()
fun consume(arg: Local<T>) {}
consume(materialize())
}
}
Local<UserKlass>().initialize()
}
val result = buildee.typeArgumentValue.localOnlyFunc()
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>result<!>
}
fun testThisExpression() {
val buildee = build {
class Local<T> {
fun localOnlyFunc(): T = UserKlass() as T
fun initialize() {
reference = this
fun <T> shareTypeInfo(from: T, to: T) {}
shareTypeInfo(this, materialize())
}
}
Local<UserKlass>().initialize()
}
val result = buildee.typeArgumentValue.localOnlyFunc()
<!DEBUG_INFO_EXPRESSION_TYPE("T")!>result<!>
}
testTypeInfoOriginInsideLocalClass()
testThisExpression()
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,45 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = In<UserSuperklass>() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class In<in T>
open class UserSuperklass
open class UserKlass: UserSuperklass()
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: In<UserKlass> = In<UserSuperklass>()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<In<UserKlass>>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: In<UserKlass>) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<In<UserKlass>>>(buildee)
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,45 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = Out<UserSubklass>() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class Out<out T>
open class UserKlass
open class UserSubklass: UserKlass()
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: Out<UserKlass> = Out<UserSubklass>()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<Out<UserKlass>>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: Out<UserKlass>) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<Out<UserKlass>>>(buildee)
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,45 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = Inv<UserSuperklass>() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class Inv<T>
open class UserSuperklass
open class UserKlass: UserSuperklass()
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: Inv<in UserKlass> = Inv<UserSuperklass>()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<Inv<in UserKlass>>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: Inv<in UserKlass>) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<Inv<in UserKlass>>>(buildee)
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,44 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = Inv<UserKlass>() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class Inv<T>
class UserKlass
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: Inv<UserKlass> = Inv()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<Inv<UserKlass>>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: Inv<UserKlass>) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<Inv<UserKlass>>>(buildee)
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,45 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = Inv<UserSubklass>() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class Inv<T>
open class UserKlass
open class UserSubklass: UserKlass()
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: Inv<out UserKlass> = Inv<UserSubklass>()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<Inv<out UserKlass>>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: Inv<out UserKlass>) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<Inv<out UserKlass>>>(buildee)
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,43 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = Inv<Any?>() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class Inv<T>
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: Inv<*> = Inv<Any?>()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<Inv<*>>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: Inv<*>) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<Inv<*>>>(buildee)
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,46 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = UserKlass<Placeholder>().Inner() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass<T> {
inner class Inner
}
class Placeholder
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: UserKlass<Placeholder>.Inner = UserKlass<Placeholder>().Inner()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<UserKlass<Placeholder>.Inner>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: UserKlass<Placeholder>.Inner) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<UserKlass<Placeholder>.Inner>>(buildee)
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,45 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = UserKlass().Inner() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass {
inner class Inner
}
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: UserKlass.Inner = UserKlass().Inner()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<UserKlass.Inner>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: UserKlass.Inner) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<UserKlass.Inner>>(buildee)
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,104 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = 42 as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: Int = 42
val buildee = build {
yield(arg)
}
checkExactType<Buildee<Int>>(buildee)
}
fun testLiterals() {
fun test1() {
val buildee = build {
yield(42)
}
checkExactType<Buildee<Int>>(buildee)
}
fun test2() {
val buildee = build {
yield(0x13)
}
checkExactType<Buildee<Int>>(buildee)
}
fun test3() {
val buildee = build {
yield(0b1000)
}
checkExactType<Buildee<Int>>(buildee)
}
test1()
test2()
test3()
}
testBasicCase()
testLiterals()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: Int) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<Int>>(buildee)
}
fun testLiterals() {
fun test1() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(42, materialize())
}
checkExactType<Buildee<Int>>(buildee)
}
fun test2() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(0x13, materialize())
}
checkExactType<Buildee<Int>>(buildee)
}
fun test3() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(0b1000, materialize())
}
checkExactType<Buildee<Int>>(buildee)
}
test1()
test2()
test3()
}
testBasicCase()
testLiterals()
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,52 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = reference as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
private var reference: Any? = null
val <T> Buildee<T>.typeArgumentValue: T get() = reference as T
interface I1
interface I2
object A: I1, I2
object B: I1, I2
fun <T> select(vararg arg: T): T = arg[0]
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val intersection = select(A, B)
val buildee = build {
yield(intersection)
}
checkTypeEquality(intersection, buildee.typeArgumentValue)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
val intersection = select(A, B)
val buildee = build {
fun <T> shareTypeInfo(from: T, to: T) {}
shareTypeInfo(intersection, materialize())
}
checkTypeEquality(intersection, buildee.typeArgumentValue)
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,153 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = reference as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
private var reference: Any? = null
val <T> Buildee<T>.typeArgumentValue: T get() = reference as T
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testLocalClassOutsideBuilderArgument() {
class Local
reference = Local()
val arg: Local = Local()
val buildee = build {
yield(arg)
}
checkExactType<Buildee<Local>>(buildee)
}
fun testLocalClassInsideBuilderArgument() {
val buildee = build {
class Local { fun localOnlyFunc() {} }
reference = Local()
val arg: Local = Local()
yield(arg)
}
buildee.typeArgumentValue.localOnlyFunc()
}
fun testTypeInfoOriginInsideLocalClass() {
val buildee = build {
class Local {
fun localOnlyFunc() {}
fun initialize() {
reference = Local()
val arg: Local = Local()
yield(arg)
}
}
Local().initialize()
}
buildee.typeArgumentValue.localOnlyFunc()
}
fun testThisExpression() {
val buildee = build {
class Local {
fun localOnlyFunc() {}
fun initialize() {
reference = this
yield(this)
}
}
Local().initialize()
}
buildee.typeArgumentValue.localOnlyFunc()
}
testLocalClassOutsideBuilderArgument()
testLocalClassInsideBuilderArgument()
testTypeInfoOriginInsideLocalClass()
testThisExpression()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testLocalClassOutsideBuilderArgument() {
class Local
reference = Local()
fun consume(arg: Local) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<Local>>(buildee)
}
fun testLocalClassInsideBuilderArgument() {
val buildee = build {
class Local { fun localOnlyFunc() {} }
reference = Local()
fun consume(arg: Local) {}
consume(materialize())
}
buildee.typeArgumentValue.localOnlyFunc()
}
fun testTypeInfoOriginInsideLocalClass() {
val buildee = build {
class Local {
fun localOnlyFunc() {}
fun initialize() {
reference = Local()
fun consume(arg: Local) {}
consume(materialize())
}
}
Local().initialize()
}
buildee.typeArgumentValue.localOnlyFunc()
}
fun testThisExpression() {
val buildee = build {
class Local {
fun localOnlyFunc() {}
fun initialize() {
reference = this
fun <T> shareTypeInfo(from: T, to: T) {}
shareTypeInfo(this, materialize())
}
}
Local().initialize()
}
buildee.typeArgumentValue.localOnlyFunc()
}
testLocalClassOutsideBuilderArgument()
testLocalClassInsideBuilderArgument()
testTypeInfoOriginInsideLocalClass()
testThisExpression()
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,32 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
import kotlin.IllegalStateException
class Buildee<CT> {
fun yield(arg: CT) {}
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
fun testYield() {
val buildee = build {
try {
yield(throw IllegalStateException())
} catch (e: IllegalStateException) {}
}
checkExactType<Buildee<Nothing>>(buildee)
}
fun box(): String {
testYield()
return "OK"
}
@@ -0,0 +1,41 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = null as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: Nothing? = null
val buildee = build {
yield(arg)
}
checkExactType<Buildee<Nothing?>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: Nothing?) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<Nothing?>>(buildee)
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,28 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
fun testYield() {
val buildee = build {
yield(null)
}
checkExactType<Buildee<Nothing?>>(buildee)
}
fun box(): String {
testYield()
return "OK"
}
@@ -0,0 +1,43 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = null as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: UserKlass? = null
val buildee = build {
yield(arg)
}
checkExactType<Buildee<UserKlass?>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: UserKlass?) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<UserKlass?>>(buildee)
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,47 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = null as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass
class Context<T> {
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: T? = null
val buildee = build {
yield(arg)
}
checkExactType<Buildee<T?>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: T?) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<T?>>(buildee)
}
}
fun box(): String {
with(Context<UserKlass>()) {
testYield()
testMaterialize()
}
return "OK"
}
@@ -0,0 +1,104 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = { -> } as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: () -> Unit = { -> }
val buildee = build {
yield(arg)
}
checkExactType<Buildee<() -> Unit>>(buildee)
}
fun testLiterals() {
fun test1() {
val buildee = build {
yield { -> }
}
checkExactType<Buildee<() -> Unit>>(buildee)
}
fun test2() {
val buildee = build {
yield(fun() {})
}
checkExactType<Buildee<() -> Unit>>(buildee)
}
fun test3() {
val buildee = build {
yield {}
}
checkExactType<Buildee<() -> Unit>>(buildee)
}
test1()
test2()
test3()
}
testBasicCase()
testLiterals()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: () -> Unit) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<() -> Unit>>(buildee)
}
fun testLiterals() {
fun test1() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo({ -> }, materialize())
}
checkExactType<Buildee<() -> Unit>>(buildee)
}
fun test2() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(fun() {}, materialize())
}
checkExactType<Buildee<() -> Unit>>(buildee)
}
fun test3() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo({}, materialize())
}
checkExactType<Buildee<() -> Unit>>(buildee)
}
test1()
test2()
test3()
}
testBasicCase()
testLiterals()
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,127 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = l@ { return@l UserKlass() } as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: () -> UserKlass = l@ { return@l UserKlass() }
val buildee = build {
yield(arg)
}
checkExactType<Buildee<() -> UserKlass>>(buildee)
}
fun testLiterals() {
fun test1() {
val buildee = build {
yield { return@yield UserKlass() }
}
checkExactType<Buildee<() -> UserKlass>>(buildee)
}
fun test2() {
val buildee = build {
yield(fun(): UserKlass { return UserKlass() })
}
checkExactType<Buildee<() -> UserKlass>>(buildee)
}
fun test3() {
val buildee = build {
yield { UserKlass() }
}
checkExactType<Buildee<() -> UserKlass>>(buildee)
}
fun test4() {
val buildee = build {
yield(fun() = UserKlass())
}
checkExactType<Buildee<() -> UserKlass>>(buildee)
}
test1()
test2()
test3()
test4()
}
testBasicCase()
testLiterals()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: () -> UserKlass) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<() -> UserKlass>>(buildee)
}
fun testLiterals() {
fun test1() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(
{ return@shareTypeInfo UserKlass() },
materialize()
)
}
checkExactType<Buildee<() -> UserKlass>>(buildee)
}
fun test2() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(
fun(): UserKlass { return UserKlass() },
materialize()
)
}
checkExactType<Buildee<() -> UserKlass>>(buildee)
}
fun test3() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo({ UserKlass() }, materialize())
}
checkExactType<Buildee<() -> UserKlass>>(buildee)
}
fun test4() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(fun() = UserKlass(), materialize())
}
checkExactType<Buildee<() -> UserKlass>>(buildee)
}
test1()
test2()
test3()
test4()
}
testBasicCase()
testLiterals()
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,104 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = "42" as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: String = "42"
val buildee = build {
yield(arg)
}
checkExactType<Buildee<String>>(buildee)
}
fun testLiterals() {
fun test1() {
val buildee = build {
yield("42")
}
checkExactType<Buildee<String>>(buildee)
}
fun test2() {
val buildee = build {
yield("""42""")
}
checkExactType<Buildee<String>>(buildee)
}
fun test3() {
val buildee = build {
yield("${4}${2}")
}
checkExactType<Buildee<String>>(buildee)
}
test1()
test2()
test3()
}
testBasicCase()
testLiterals()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: String) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<String>>(buildee)
}
fun testLiterals() {
fun test1() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo("42", materialize())
}
checkExactType<Buildee<String>>(buildee)
}
fun test2() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo("""42""", materialize())
}
checkExactType<Buildee<String>>(buildee)
}
fun test3() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo("${4}${2}", materialize())
}
checkExactType<Buildee<String>>(buildee)
}
test1()
test2()
test3()
}
testBasicCase()
testLiterals()
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,68 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
// WITH_STDLIB
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = suspend {} as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
fun testBasicCase() {
val arg: suspend () -> Unit = suspend {}
val buildee = build {
yield(arg)
}
checkExactType<Buildee<suspend () -> Unit>>(buildee)
}
fun testLiteral() {
val buildee = build {
yield(suspend {})
}
checkExactType<Buildee<suspend () -> Unit>>(buildee)
}
testBasicCase()
testLiteral()
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun testBasicCase() {
fun consume(arg: suspend () -> Unit) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<suspend () -> Unit>>(buildee)
}
fun testLiteral() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(suspend {}, materialize())
}
checkExactType<Buildee<suspend () -> Unit>>(buildee)
}
testBasicCase()
testLiteral()
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,47 @@
// IGNORE_BACKEND: NATIVE
// IGNORE_BACKEND: WASM
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = UserKlass() as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass
class Context<T> {
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val arg: T = UserKlass() as T
val buildee = build {
yield(arg)
}
checkExactType<Buildee<T>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: T) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<T>>(buildee)
}
}
fun box(): String {
with(Context<UserKlass>()) {
testYield()
testMaterialize()
}
return "OK"
}
@@ -0,0 +1,46 @@
// DIAGNOSTICS: -UNCHECKED_CAST
// CHECK_TYPE_WITH_EXACT
// ISSUE: KT-60719
/* ATTENTION:
* this test is supposed to monitor unclear feature behavior;
* an explicit design decision regarding said behavior has not been made at the moment of test creation;
* if the behavior of the test changes, please consult with the linked YT ticket
* and either add a comment about the change if an explicit design decision is still unavailable
* (preferably accompanied by an analysis of the change's reasons)
* or remove this disclaimer otherwise
*/
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = { _: UserKlass -> } as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val buildee = build {
yield { val x: UserKlass = <!UNRESOLVED_REFERENCE!>it<!> }
}
checkExactType<Buildee<(UserKlass) -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin/Function1<UserKlass, kotlin/Unit>>; Buildee<kotlin/Function0<kotlin/Unit>>")!>buildee<!>)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(
{ val x: UserKlass = <!UNRESOLVED_REFERENCE!>it<!> },
materialize()
)
}
checkExactType<Buildee<(UserKlass) -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin/Function1<UserKlass, kotlin/Unit>>; Buildee<kotlin/Function0<kotlin/Unit>>")!>buildee<!>)
}
@@ -0,0 +1,46 @@
// DIAGNOSTICS: -UNCHECKED_CAST
// CHECK_TYPE_WITH_EXACT
// ISSUE: KT-60719
/* ATTENTION:
* this test is supposed to monitor unclear feature behavior;
* an explicit design decision regarding said behavior has not been made at the moment of test creation;
* if the behavior of the test changes, please consult with the linked YT ticket
* and either add a comment about the change if an explicit design decision is still unavailable
* (preferably accompanied by an analysis of the change's reasons)
* or remove this disclaimer otherwise
*/
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = { _: UserKlass -> } as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val buildee = build {
yield { val x: UserKlass = <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, DEBUG_INFO_UNRESOLVED_WITH_TARGET, UNRESOLVED_REFERENCE!>it<!> }
}
checkExactType<Buildee<(UserKlass) -> Unit>>(<!TYPE_MISMATCH("Buildee<(UserKlass) -> Unit>; Buildee<() -> Unit>"), TYPE_MISMATCH("Buildee<() -> Unit>; Buildee<(UserKlass) -> Unit>")!>buildee<!>)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(
{ val x: UserKlass = <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE, DEBUG_INFO_UNRESOLVED_WITH_TARGET, UNRESOLVED_REFERENCE!>it<!> },
materialize()
)
}
checkExactType<Buildee<(UserKlass) -> Unit>>(<!TYPE_MISMATCH("Buildee<(UserKlass) -> Unit>; Buildee<() -> Unit>"), TYPE_MISMATCH("Buildee<() -> Unit>; Buildee<(UserKlass) -> Unit>")!>buildee<!>)
}
@@ -0,0 +1,46 @@
// DIAGNOSTICS: -UNCHECKED_CAST
// CHECK_TYPE_WITH_EXACT
// ISSUE: KT-60720
/* ATTENTION:
* this test is supposed to monitor unclear feature behavior;
* an explicit design decision regarding said behavior has not been made at the moment of test creation;
* if the behavior of the test changes, please consult with the linked YT ticket
* and either add a comment about the change if an explicit design decision is still unavailable
* (preferably accompanied by an analysis of the change's reasons)
* or remove this disclaimer otherwise
*/
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = fun UserKlass.() {} as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val buildee = build {
yield { val x: UserKlass = this<!UNRESOLVED_LABEL!>@yield<!> }
}
checkExactType<Buildee<UserKlass.() -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<@ExtensionFunctionType kotlin/Function1<UserKlass, kotlin/Unit>>; Buildee<kotlin/Function0<kotlin/Unit>>")!>buildee<!>)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(
{ val x: UserKlass = this<!UNRESOLVED_LABEL!>@shareTypeInfo<!> },
materialize()
)
}
checkExactType<Buildee<UserKlass.() -> Unit>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<@ExtensionFunctionType kotlin/Function1<UserKlass, kotlin/Unit>>; Buildee<kotlin/Function0<kotlin/Unit>>")!>buildee<!>)
}
@@ -0,0 +1,46 @@
// DIAGNOSTICS: -UNCHECKED_CAST
// CHECK_TYPE_WITH_EXACT
// ISSUE: KT-60720
/* ATTENTION:
* this test is supposed to monitor unclear feature behavior;
* an explicit design decision regarding said behavior has not been made at the moment of test creation;
* if the behavior of the test changes, please consult with the linked YT ticket
* and either add a comment about the change if an explicit design decision is still unavailable
* (preferably accompanied by an analysis of the change's reasons)
* or remove this disclaimer otherwise
*/
class Buildee<CT> {
fun yield(arg: CT) {}
fun materialize(): CT = fun UserKlass.() {} as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
class UserKlass
// test 1: PTV is in consuming position (yield-case)
fun testYield() {
val buildee = build {
yield { val x: UserKlass = <!NO_THIS!>this@yield<!> }
}
checkExactType<Buildee<UserKlass.() -> Unit>>(<!TYPE_MISMATCH("Buildee<UserKlass.() -> Unit>; Buildee<() -> Unit>"), TYPE_MISMATCH("Buildee<() -> Unit>; Buildee<UserKlass.() -> Unit>")!>buildee<!>)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(
{ val x: UserKlass = <!NO_THIS!>this@shareTypeInfo<!> },
materialize()
)
}
checkExactType<Buildee<UserKlass.() -> Unit>>(<!TYPE_MISMATCH("Buildee<UserKlass.() -> Unit>; Buildee<() -> Unit>"), TYPE_MISMATCH("Buildee<() -> Unit>; Buildee<UserKlass.() -> Unit>")!>buildee<!>)
}
@@ -0,0 +1,32 @@
// FIR_IDENTICAL
// DIAGNOSTICS: -UNCHECKED_CAST, -UNREACHABLE_CODE
// CHECK_TYPE_WITH_EXACT
// ISSUE: KT-60880
/* ATTENTION:
* this test monitors an unfixed compiler bug;
* if the behavior of the test changes, please consult with the linked YT ticket
* to check whether the described problem has been fixed by your changes;
* if the issue isn't actually fixed but new behavior persists,
* please add a comment about the behavior change to the ticket
* (preferably accompanied by an analysis of the change's reasons)
*/
class Buildee<CT> {
fun materialize(): CT = null as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
fun testMaterialize() {
fun consume(arg: Nothing) {}
val buildee = build {
consume(materialize())
}
checkExactType<Buildee<Nothing>>(buildee)
}
@@ -0,0 +1,31 @@
// DIAGNOSTICS: -UNCHECKED_CAST, -UNREACHABLE_CODE
// CHECK_TYPE_WITH_EXACT
// ISSUE: KT-60877
/* ATTENTION:
* this test monitors an unfixed compiler bug;
* if the behavior of the test changes, please consult with the linked YT ticket
* to check whether the described problem has been fixed by your changes;
* if the issue isn't actually fixed but new behavior persists,
* please add a comment about the behavior change to the ticket
* (preferably accompanied by an analysis of the change's reasons)
*/
class Buildee<CT> {
fun materialize(): CT = null as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
fun testMaterialize() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(null, materialize())
}
checkExactType<Buildee<Nothing?>>(<!ARGUMENT_TYPE_MISMATCH("Buildee<kotlin/Nothing?>; Buildee<kotlin/Nothing>")!>buildee<!>)
}
@@ -0,0 +1,31 @@
// DIAGNOSTICS: -UNCHECKED_CAST, -UNREACHABLE_CODE
// CHECK_TYPE_WITH_EXACT
// ISSUE: KT-60877
/* ATTENTION:
* this test monitors an unfixed compiler bug;
* if the behavior of the test changes, please consult with the linked YT ticket
* to check whether the described problem has been fixed by your changes;
* if the issue isn't actually fixed but new behavior persists,
* please add a comment about the behavior change to the ticket
* (preferably accompanied by an analysis of the change's reasons)
*/
class Buildee<CT> {
fun materialize(): CT = null as CT
}
fun <FT> build(
instructions: Buildee<FT>.() -> Unit
): Buildee<FT> {
return Buildee<FT>().apply(instructions)
}
fun testMaterialize() {
fun <T> shareTypeInfo(from: T, to: T) {}
val buildee = build {
shareTypeInfo(null, materialize())
}
checkExactType<Buildee<Nothing?>>(<!TYPE_MISMATCH("Buildee<Nothing?>; Buildee<Nothing>"), TYPE_MISMATCH("Buildee<Nothing>; Buildee<Nothing?>")!>buildee<!>)
}
@@ -3430,6 +3430,40 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Test
@TestMetadata("FunctionWithParameterToUnitImplicitLiteralsCase.kt")
public void testFunctionWithParameterToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnitImplicitLiteralsCase.kt")
public void testFunctionWithReceiverToUnitImplicitLiteralsCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnitImplicitLiteralsCase.kt");
}
@Test
@TestMetadata("NothingMaterializeCase.kt")
public void testNothingMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingMaterializeCase.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralMaterializeCase.kt")
public void testNullableNothingNullLiteralMaterializeCase() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralMaterializeCase.kt");
}
}
}
}
}
@@ -2659,6 +2659,232 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -2833,6 +2833,232 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -2833,6 +2833,232 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -2486,6 +2486,199 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class TargetTypes extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -1945,6 +1945,232 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -1945,6 +1945,232 @@ public class FirJsES6CodegenBoxTestGenerated extends AbstractFirJsES6CodegenBoxT
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -1945,6 +1945,232 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -1945,6 +1945,232 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -2016,6 +2016,235 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -2070,6 +2070,237 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -1990,6 +1990,234 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
@UseExtTestCaseGroupProvider()
@DisabledTestsIfProperty(sourceLocations = { "compiler/testData/codegen/box/coroutines/featureIntersection/defaultExpect.kt", "compiler/testData/codegen/box/multiplatform/defaultArguments/*.kt", "compiler/testData/codegen/box/multiplatform/migratedOldTests/*.kt", "compiler/testData/codegen/boxInline/multiplatform/defaultArguments/receiversAndParametersInLambda.kt" }, property = ClassLevelProperty.TEST_MODE, propertyValue = "ONE_STAGE_MULTI_MODULE")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -2017,6 +2017,235 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -1933,6 +1933,232 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}
@@ -1933,6 +1933,232 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes")
@TestDataPath("$PROJECT_ROOT")
public class TargetTypes {
@Test
public void testAllFilesPresentInTargetTypes() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Test
@TestMetadata("AnonymousObject.kt")
public void testAnonymousObject() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/AnonymousObject.kt");
}
@Test
@TestMetadata("DefinitelyNonNullableTypeParameter.kt")
public void testDefinitelyNonNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/DefinitelyNonNullableTypeParameter.kt");
}
@Test
@TestMetadata("EnclosingClass.kt")
public void testEnclosingClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingClass.kt");
}
@Test
@TestMetadata("EnclosingEnumerationEntryType.kt")
public void testEnclosingEnumerationEntryType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationEntryType.kt");
}
@Test
@TestMetadata("EnclosingEnumerationType.kt")
public void testEnclosingEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingEnumerationType.kt");
}
@Test
@TestMetadata("EnclosingExplicitlyGenericInnerClass.kt")
public void testEnclosingExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingGenericClass.kt")
public void testEnclosingGenericClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingGenericClass.kt");
}
@Test
@TestMetadata("EnclosingImplicitlyGenericInnerClass.kt")
public void testEnclosingImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("EnclosingInnerClass.kt")
public void testEnclosingInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnclosingInnerClass.kt");
}
@Test
@TestMetadata("EnumerationType.kt")
public void testEnumerationType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/EnumerationType.kt");
}
@Test
@TestMetadata("ExplicitlyGenericInnerClass.kt")
public void testExplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ExplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("FunctionWithParameterToUnit.kt")
public void testFunctionWithParameterToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithParameterToUnit.kt");
}
@Test
@TestMetadata("FunctionWithReceiverToUnit.kt")
public void testFunctionWithReceiverToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/FunctionWithReceiverToUnit.kt");
}
@Test
@TestMetadata("GenericLocalClass.kt")
public void testGenericLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClass.kt");
}
@Test
@TestMetadata("GenericLocalClassWithLeakingTypeParameter.kt")
public void testGenericLocalClassWithLeakingTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericLocalClassWithLeakingTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithContravariantTypeParameter.kt")
public void testGenericWithContravariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithContravariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithCovariantTypeParameter.kt")
public void testGenericWithCovariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithCovariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithInProjectedTypeArgument.kt")
public void testGenericWithInProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithInvariantTypeParameter.kt")
public void testGenericWithInvariantTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithInvariantTypeParameter.kt");
}
@Test
@TestMetadata("GenericWithOutProjectedTypeArgument.kt")
public void testGenericWithOutProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithOutProjectedTypeArgument.kt");
}
@Test
@TestMetadata("GenericWithStarProjectedTypeArgument.kt")
public void testGenericWithStarProjectedTypeArgument() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/GenericWithStarProjectedTypeArgument.kt");
}
@Test
@TestMetadata("ImplicitlyGenericInnerClass.kt")
public void testImplicitlyGenericInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/ImplicitlyGenericInnerClass.kt");
}
@Test
@TestMetadata("InnerClass.kt")
public void testInnerClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/InnerClass.kt");
}
@Test
@TestMetadata("Int.kt")
public void testInt() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/Int.kt");
}
@Test
@TestMetadata("IntersectionType.kt")
public void testIntersectionType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/IntersectionType.kt");
}
@Test
@TestMetadata("LocalClass.kt")
public void testLocalClass() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/LocalClass.kt");
}
@Test
@TestMetadata("NothingYieldCase.kt")
public void testNothingYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NothingYieldCase.kt");
}
@Test
@TestMetadata("NullableNothing.kt")
public void testNullableNothing() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothing.kt");
}
@Test
@TestMetadata("NullableNothingNullLiteralYieldCase.kt")
public void testNullableNothingNullLiteralYieldCase() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableNothingNullLiteralYieldCase.kt");
}
@Test
@TestMetadata("NullableType.kt")
public void testNullableType() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableType.kt");
}
@Test
@TestMetadata("NullableTypeParameter.kt")
public void testNullableTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullableTypeParameter.kt");
}
@Test
@TestMetadata("NullaryFunctionToUnit.kt")
public void testNullaryFunctionToUnit() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionToUnit.kt");
}
@Test
@TestMetadata("NullaryFunctionWithReturnValue.kt")
public void testNullaryFunctionWithReturnValue() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/NullaryFunctionWithReturnValue.kt");
}
@Test
@TestMetadata("String.kt")
public void testString() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/String.kt");
}
@Test
@TestMetadata("SuspendingFunction.kt")
public void testSuspendingFunction() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/SuspendingFunction.kt");
}
@Test
@TestMetadata("TypeParameter.kt")
public void testTypeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/targetTypes/TypeParameter.kt");
}
}
}
}
}