[tests] BI (1P&1TV/1TIO): add tests for basic cases

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

relevant issues:
KT-59551
This commit is contained in:
Stanislav Ruban
2023-07-24 18:37:10 +03:00
committed by Space Team
parent 1eda35a59c
commit b13a225949
26 changed files with 1499 additions and 0 deletions
@@ -3229,6 +3229,52 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/callableReference")
@TestDataPath("$PROJECT_ROOT")
@@ -3229,6 +3229,52 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/callableReference")
@TestDataPath("$PROJECT_ROOT")
@@ -3229,6 +3229,52 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/callableReference")
@TestDataPath("$PROJECT_ROOT")
@@ -3235,6 +3235,52 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/callableReference")
@TestDataPath("$PROJECT_ROOT")
@@ -2698,6 +2698,70 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@@ -2698,6 +2698,70 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@@ -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 = 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 arg: UserKlass = UserKlass()
val buildee = build(fun(it) {
it.yield(arg)
})
checkExactType<Buildee<UserKlass>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: UserKlass) {}
val buildee = build(fun(it) {
consume(it.materialize())
})
checkExactType<Buildee<UserKlass>>(buildee)
}
fun box(): String {
testYield()
testMaterialize()
return "OK"
}
@@ -0,0 +1,46 @@
// IGNORE_BACKEND_K2: NATIVE
// IGNORE_BACKEND_K2: WASM
// IGNORE_BACKEND_K2: JS, JS_IR, JS_IR_ES6
// IGNORE_LIGHT_ANALYSIS
// CHECK_TYPE_WITH_EXACT
// IGNORE_BACKEND_K1: ANY
// ISSUE: KT-59551
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 arg: UserKlass = UserKlass()
val buildee = build(fun(it) {
it.yield(arg)
})
checkExactType<Buildee<UserKlass>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: UserKlass) {}
val buildee = build(fun(it) {
consume(it.materialize())
})
checkExactType<Buildee<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 = 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 arg: UserKlass = UserKlass()
val buildee = build {
it.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(it.materialize())
}
checkExactType<Buildee<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 = 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 arg: UserKlass = UserKlass()
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,37 @@
// DIAGNOSTICS: -UNCHECKED_CAST
// CHECK_TYPE_WITH_EXACT
// ISSUE: KT-59551
// (also see an analogous codegen test)
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 arg: UserKlass = UserKlass()
val buildee = build(fun(it) {
it.yield(arg)
})
checkExactType<Buildee<UserKlass>>(buildee)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: UserKlass) {}
val buildee = build(fun(it) {
consume(it.materialize())
})
checkExactType<Buildee<UserKlass>>(buildee)
}
@@ -0,0 +1,37 @@
// DIAGNOSTICS: -UNCHECKED_CAST
// CHECK_TYPE_WITH_EXACT
// ISSUE: KT-59551
// (also see an analogous codegen test)
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 arg: UserKlass = UserKlass()
val buildee = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>build<!>(fun(it) {
it.<!UNRESOLVED_REFERENCE!>yield<!>(arg)
})
checkExactType<Buildee<UserKlass>>(<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>buildee<!>)
}
// test 2: PTV is in producing position (materialize-case)
fun testMaterialize() {
fun consume(arg: UserKlass) {}
val buildee = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>build<!>(fun(it) {
consume(it.<!UNRESOLVED_REFERENCE!>materialize<!>())
})
checkExactType<Buildee<UserKlass>>(<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>buildee<!>)
}
@@ -3235,6 +3235,52 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/diagnostics/tests/callableReference")
@TestDataPath("$PROJECT_ROOT")
@@ -2536,6 +2536,70 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@@ -2698,6 +2698,70 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@@ -2698,6 +2698,70 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@@ -2351,6 +2351,78 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
}
}
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class BuilderInference extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class OneParameter extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class OneTypeVariable extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public static class OneTypeInfoOrigin extends AbstractLightAnalysisModeTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
@@ -1822,6 +1822,70 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@@ -1822,6 +1822,70 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@@ -1822,6 +1822,70 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@@ -1878,6 +1878,82 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@@ -1922,6 +1922,90 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
@Tag("frontend-fir")
@FirPipeline()
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@@ -1857,6 +1857,78 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@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 BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@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 OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@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 OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@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 OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@@ -1879,6 +1879,82 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
@UseExtTestCaseGroupProvider()
@UsePartialLinkage(mode = Mode.DISABLED)
@Tag("no-partial-linkage-may-be-skipped")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@@ -1810,6 +1810,70 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")
@@ -1810,6 +1810,70 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference")
@TestDataPath("$PROJECT_ROOT")
public class BuilderInference {
@Test
public void testAllFilesPresentInBuilderInference() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter")
@TestDataPath("$PROJECT_ROOT")
public class OneParameter {
@Test
public void testAllFilesPresentInOneParameter() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeVariable {
@Test
public void testAllFilesPresentInOneTypeVariable() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin")
@TestDataPath("$PROJECT_ROOT")
public class OneTypeInfoOrigin {
@Test
public void testAllFilesPresentInOneTypeInfoOrigin() throws Exception {
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeParameter.kt")
public void testAnonymousFunctionArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("AnonymousFunctionArgumentAndBuildeeReceiver.kt")
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeParameter.kt")
public void testLambdaArgumentAndBuildeeParameter() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeParameter.kt");
}
@Test
@TestMetadata("LambdaArgumentAndBuildeeReceiver.kt")
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
}
}
}
}
}
@Nested
@TestMetadata("compiler/testData/codegen/box/builtinStubMethods")
@TestDataPath("$PROJECT_ROOT")