[tests] BI (1P&1TV/1TIO): add tests for contexts of source-sink feeds
single builder parameter single postponed type variable single origin of type information relevant issues: KT-60274 KT-60663
This commit is contained in:
committed by
Space Team
parent
b13a225949
commit
8bd823de0d
+22
@@ -3270,6 +3270,28 @@ public class DiagnosticCompilerTestFE10TestdataTestGenerated extends AbstractDia
|
|||||||
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
|
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedBuilderInferenceLambda.kt")
|
||||||
|
public void testInsideNestedBuilderInferenceLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedBuilderInferenceLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+22
@@ -3270,6 +3270,28 @@ public class LLFirPreresolvedReversedDiagnosticCompilerFE10TestDataTestGenerated
|
|||||||
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
|
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedBuilderInferenceLambda.kt")
|
||||||
|
public void testInsideNestedBuilderInferenceLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedBuilderInferenceLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+22
@@ -3270,6 +3270,28 @@ public class FirLightTreeOldFrontendDiagnosticsTestGenerated extends AbstractFir
|
|||||||
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
|
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedBuilderInferenceLambda.kt")
|
||||||
|
public void testInsideNestedBuilderInferenceLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedBuilderInferenceLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+22
@@ -3276,6 +3276,28 @@ public class FirPsiOldFrontendDiagnosticsTestGenerated extends AbstractFirPsiDia
|
|||||||
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
|
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true, "multiplatform");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedBuilderInferenceLambda.kt")
|
||||||
|
public void testInsideNestedBuilderInferenceLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedBuilderInferenceLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+40
@@ -2757,6 +2757,46 @@ public class FirLightTreeBlackBoxCodegenTestGenerated extends AbstractFirLightTr
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+40
@@ -2757,6 +2757,46 @@ public class FirPsiBlackBoxCodegenTestGenerated extends AbstractFirPsiBlackBoxCo
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+51
@@ -0,0 +1,51 @@
|
|||||||
|
// 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 {
|
||||||
|
object {
|
||||||
|
init {
|
||||||
|
yield(arg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checkExactType<Buildee<UserKlass>>(buildee)
|
||||||
|
}
|
||||||
|
|
||||||
|
// test 2: PTV is in producing position (materialize-case)
|
||||||
|
fun testMaterialize() {
|
||||||
|
fun consume(arg: UserKlass) {}
|
||||||
|
val buildee = build {
|
||||||
|
object {
|
||||||
|
init {
|
||||||
|
consume(materialize())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checkExactType<Buildee<UserKlass>>(buildee)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
testYield()
|
||||||
|
testMaterialize()
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+49
@@ -0,0 +1,49 @@
|
|||||||
|
// 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
|
||||||
|
|
||||||
|
fun execute(action: () -> Unit) {}
|
||||||
|
|
||||||
|
// test 1: PTV is in consuming position (yield-case)
|
||||||
|
fun testYield() {
|
||||||
|
val arg: UserKlass = UserKlass()
|
||||||
|
val buildee = build {
|
||||||
|
execute {
|
||||||
|
yield(arg)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checkExactType<Buildee<UserKlass>>(buildee)
|
||||||
|
}
|
||||||
|
|
||||||
|
// test 2: PTV is in producing position (materialize-case)
|
||||||
|
fun testMaterialize() {
|
||||||
|
fun consume(arg: UserKlass) {}
|
||||||
|
val buildee = build {
|
||||||
|
execute {
|
||||||
|
consume(materialize())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checkExactType<Buildee<UserKlass>>(buildee)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
testYield()
|
||||||
|
testMaterialize()
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+41
@@ -0,0 +1,41 @@
|
|||||||
|
// 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-60274
|
||||||
|
|
||||||
|
import kotlin.reflect.KProperty
|
||||||
|
|
||||||
|
class Buildee<CT> {
|
||||||
|
fun materialize(): CT = UserKlass() as CT
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <FT> build(
|
||||||
|
instructions: Buildee<FT>.() -> Unit
|
||||||
|
): Buildee<FT> {
|
||||||
|
return Buildee<FT>().apply(instructions)
|
||||||
|
}
|
||||||
|
|
||||||
|
class UserKlass
|
||||||
|
|
||||||
|
class Delegate<T>(private val value: T) {
|
||||||
|
operator fun getValue(reference: Nothing?, property: KProperty<*>): T = value
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testMaterialize() {
|
||||||
|
fun consume(arg: UserKlass) {}
|
||||||
|
val buildee = build {
|
||||||
|
val temp by Delegate(materialize())
|
||||||
|
consume(temp)
|
||||||
|
}
|
||||||
|
checkExactType<Buildee<UserKlass>>(buildee)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
testMaterialize()
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+38
@@ -0,0 +1,38 @@
|
|||||||
|
// IGNORE_BACKEND: NATIVE
|
||||||
|
// IGNORE_BACKEND: WASM
|
||||||
|
// IGNORE_BACKEND: JS, JS_IR, JS_IR_ES6
|
||||||
|
// IGNORE_LIGHT_ANALYSIS
|
||||||
|
|
||||||
|
// CHECK_TYPE_WITH_EXACT
|
||||||
|
|
||||||
|
import kotlin.reflect.KProperty
|
||||||
|
|
||||||
|
class Buildee<CT> {
|
||||||
|
fun yield(arg: CT) {}
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <FT> build(
|
||||||
|
instructions: Buildee<FT>.() -> Unit
|
||||||
|
): Buildee<FT> {
|
||||||
|
return Buildee<FT>().apply(instructions)
|
||||||
|
}
|
||||||
|
|
||||||
|
class UserKlass
|
||||||
|
|
||||||
|
class Delegate<T>(private val value: T) {
|
||||||
|
operator fun getValue(reference: Nothing?, property: KProperty<*>): T = value
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testYield() {
|
||||||
|
val arg: UserKlass = UserKlass()
|
||||||
|
val buildee = build {
|
||||||
|
val temp by Delegate(arg)
|
||||||
|
yield(temp)
|
||||||
|
}
|
||||||
|
checkExactType<Buildee<UserKlass>>(buildee)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
testYield()
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+45
@@ -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() 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 {
|
||||||
|
val temp = arg
|
||||||
|
yield(temp)
|
||||||
|
}
|
||||||
|
checkExactType<Buildee<UserKlass>>(buildee)
|
||||||
|
}
|
||||||
|
|
||||||
|
// test 2: PTV is in producing position (materialize-case)
|
||||||
|
fun testMaterialize() {
|
||||||
|
fun consume(arg: UserKlass) {}
|
||||||
|
val buildee = build {
|
||||||
|
val temp = materialize()
|
||||||
|
consume(temp)
|
||||||
|
}
|
||||||
|
checkExactType<Buildee<UserKlass>>(buildee)
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
testYield()
|
||||||
|
testMaterialize()
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
+59
@@ -0,0 +1,59 @@
|
|||||||
|
// DIAGNOSTICS: -UNCHECKED_CAST
|
||||||
|
|
||||||
|
// CHECK_TYPE_WITH_EXACT
|
||||||
|
|
||||||
|
// ISSUE: KT-60663
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
class NestedBuildee<T> {
|
||||||
|
fun nestedYield(arg: T) {}
|
||||||
|
}
|
||||||
|
fun <T> nestedBuild(
|
||||||
|
instructions: NestedBuildee<T>.() -> Unit
|
||||||
|
): NestedBuildee<T> {
|
||||||
|
return NestedBuildee<T>().apply(instructions)
|
||||||
|
}
|
||||||
|
|
||||||
|
// test 1: PTV is in consuming position (yield-case)
|
||||||
|
fun testYield() {
|
||||||
|
val arg: UserKlass = UserKlass()
|
||||||
|
val buildee = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>build<!> {
|
||||||
|
nestedBuild {
|
||||||
|
yield(arg)
|
||||||
|
nestedYield(42)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>checkExactType<!><<!CANNOT_INFER_PARAMETER_TYPE!>Buildee<UserKlass><!>>(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<!> {
|
||||||
|
nestedBuild {
|
||||||
|
consume(materialize())
|
||||||
|
nestedYield(42)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>checkExactType<!><<!CANNOT_INFER_PARAMETER_TYPE!>Buildee<UserKlass><!>>(buildee)
|
||||||
|
}
|
||||||
+59
@@ -0,0 +1,59 @@
|
|||||||
|
// DIAGNOSTICS: -UNCHECKED_CAST
|
||||||
|
|
||||||
|
// CHECK_TYPE_WITH_EXACT
|
||||||
|
|
||||||
|
// ISSUE: KT-60663
|
||||||
|
/* 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
|
||||||
|
|
||||||
|
class NestedBuildee<T> {
|
||||||
|
fun nestedYield(arg: T) {}
|
||||||
|
}
|
||||||
|
fun <T> nestedBuild(
|
||||||
|
instructions: NestedBuildee<T>.() -> Unit
|
||||||
|
): NestedBuildee<T> {
|
||||||
|
return NestedBuildee<T>().apply(instructions)
|
||||||
|
}
|
||||||
|
|
||||||
|
// test 1: PTV is in consuming position (yield-case)
|
||||||
|
fun testYield() {
|
||||||
|
val arg: UserKlass = UserKlass()
|
||||||
|
val buildee = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>build<!> {
|
||||||
|
nestedBuild {
|
||||||
|
yield(arg)
|
||||||
|
nestedYield(42)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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<!> {
|
||||||
|
nestedBuild {
|
||||||
|
consume(materialize())
|
||||||
|
nestedYield(42)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
checkExactType<Buildee<UserKlass>>(<!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>buildee<!>)
|
||||||
|
}
|
||||||
+34
@@ -0,0 +1,34 @@
|
|||||||
|
// FIR_IDENTICAL
|
||||||
|
// DIAGNOSTICS: -UNCHECKED_CAST
|
||||||
|
|
||||||
|
// CHECK_TYPE_WITH_EXACT
|
||||||
|
|
||||||
|
// ISSUE: KT-60274
|
||||||
|
// (also see an analogous codegen test)
|
||||||
|
|
||||||
|
import kotlin.reflect.KProperty
|
||||||
|
|
||||||
|
class Buildee<CT> {
|
||||||
|
fun materialize(): CT = UserKlass() as CT
|
||||||
|
}
|
||||||
|
|
||||||
|
fun <FT> build(
|
||||||
|
instructions: Buildee<FT>.() -> Unit
|
||||||
|
): Buildee<FT> {
|
||||||
|
return Buildee<FT>().apply(instructions)
|
||||||
|
}
|
||||||
|
|
||||||
|
class UserKlass
|
||||||
|
|
||||||
|
class Delegate<T>(private val value: T) {
|
||||||
|
operator fun getValue(reference: Nothing?, property: KProperty<*>): T = value
|
||||||
|
}
|
||||||
|
|
||||||
|
fun testMaterialize() {
|
||||||
|
fun consume(arg: UserKlass) {}
|
||||||
|
val buildee = build {
|
||||||
|
val temp by Delegate(materialize())
|
||||||
|
consume(temp)
|
||||||
|
}
|
||||||
|
checkExactType<Buildee<UserKlass>>(buildee)
|
||||||
|
}
|
||||||
Generated
+22
@@ -3276,6 +3276,28 @@ public class DiagnosticTestGenerated extends AbstractDiagnosticTest {
|
|||||||
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
|
public void testAnonymousFunctionArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/AnonymousFunctionArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.*)\\.kts?$"), Pattern.compile("^(.+)\\.(reversed|fir|ll)\\.kts?$"), true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedBuilderInferenceLambda.kt")
|
||||||
|
public void testInsideNestedBuilderInferenceLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedBuilderInferenceLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/diagnostics/tests/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+40
@@ -2595,6 +2595,46 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+40
@@ -2757,6 +2757,46 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+40
@@ -2757,6 +2757,46 @@ public class IrBlackBoxCodegenWithIrInlinerTestGenerated extends AbstractIrBlack
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+38
@@ -2418,6 +2418,44 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@RunWith(JUnit3RunnerWithInners.class)
|
||||||
|
public static class SourceSinkFeedContexts extends AbstractLightAnalysisModeTest {
|
||||||
|
private void runTest(String testDataFilePath) throws Exception {
|
||||||
|
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+40
@@ -1881,6 +1881,46 @@ public class FirJsCodegenBoxTestGenerated extends AbstractFirJsCodegenBoxTest {
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+40
@@ -1881,6 +1881,46 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+40
@@ -1881,6 +1881,46 @@ public class IrJsES6CodegenBoxTestGenerated extends AbstractIrJsES6CodegenBoxTes
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JS_IR_ES6, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+43
@@ -1949,6 +1949,49 @@ public class FirNativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTe
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@Tag("frontend-fir")
|
||||||
|
@FirPipeline()
|
||||||
|
@UseExtTestCaseGroupProvider()
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+45
@@ -2001,6 +2001,51 @@ public class FirNativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenB
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@Tag("frontend-fir")
|
||||||
|
@FirPipeline()
|
||||||
|
@UseExtTestCaseGroupProvider()
|
||||||
|
@UsePartialLinkage(mode = Mode.DISABLED)
|
||||||
|
@Tag("no-partial-linkage-may-be-skipped")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+42
@@ -1924,6 +1924,48 @@ public class NativeCodegenBoxTestGenerated extends AbstractNativeCodegenBoxTest
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@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 SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+43
@@ -1950,6 +1950,49 @@ public class NativeCodegenBoxTestNoPLGenerated extends AbstractNativeCodegenBoxT
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
@UseExtTestCaseGroupProvider()
|
||||||
|
@UsePartialLinkage(mode = Mode.DISABLED)
|
||||||
|
@Tag("no-partial-linkage-may-be-skipped")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.NATIVE, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+40
@@ -1869,6 +1869,46 @@ public class FirWasmCodegenBoxTestGenerated extends AbstractFirWasmCodegenBoxTes
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+40
@@ -1869,6 +1869,46 @@ public class K1WasmCodegenBoxTestGenerated extends AbstractK1WasmCodegenBoxTest
|
|||||||
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
public void testLambdaArgumentAndBuildeeReceiver() throws Exception {
|
||||||
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/LambdaArgumentAndBuildeeReceiver.kt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
@TestMetadata("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts")
|
||||||
|
@TestDataPath("$PROJECT_ROOT")
|
||||||
|
public class SourceSinkFeedContexts {
|
||||||
|
@Test
|
||||||
|
public void testAllFilesPresentInSourceSinkFeedContexts() throws Exception {
|
||||||
|
KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts"), Pattern.compile("^([^_](.+))\\.kt$"), null, TargetBackend.WASM, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideAnonymousObject.kt")
|
||||||
|
public void testInsideAnonymousObject() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideAnonymousObject.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("InsideNestedLambda.kt")
|
||||||
|
public void testInsideNestedLambda() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/InsideNestedLambda.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableMaterializeCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableMaterializeCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableMaterializeCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughDelegatedLocalVariableYieldCase.kt")
|
||||||
|
public void testThroughDelegatedLocalVariableYieldCase() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughDelegatedLocalVariableYieldCase.kt");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
@TestMetadata("ThroughLocalVariable.kt")
|
||||||
|
public void testThroughLocalVariable() throws Exception {
|
||||||
|
runTest("compiler/testData/codegen/box/builderInference/oneParameter/oneTypeVariable/oneTypeInfoOrigin/sourceSinkFeedContexts/ThroughLocalVariable.kt");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user