diff --git a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestGenerated.java b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestGenerated.java index 559adbdee7b..873b00f97d0 100644 --- a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestGenerated.java +++ b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestGenerated.java @@ -6211,6 +6211,11 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.kt"); } + @TestMetadata("kt38714.kt") + public void testKt38714() throws Exception { + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.kt"); + } + @TestMetadata("localDelegatedProperty.kt") public void testLocalDelegatedProperty() throws Exception { runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/localDelegatedProperty.kt"); @@ -11922,6 +11927,11 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte runTest("compiler/testData/diagnostics/tests/inference/regressions/kt37650.kt"); } + @TestMetadata("kt38549.kt") + public void testKt38549() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt38549.kt"); + } + @TestMetadata("kt38691.kt") public void testKt38691() throws Exception { runTest("compiler/testData/diagnostics/tests/inference/regressions/kt38691.kt"); @@ -21650,6 +21660,11 @@ public class FirOldFrontendDiagnosticsTestGenerated extends AbstractFirOldFronte runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnIf.kt"); } + @TestMetadata("smartCastOnLastExpressionOfLambdaAfterNothing.kt") + public void testSmartCastOnLastExpressionOfLambdaAfterNothing() throws Exception { + runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnLastExpressionOfLambdaAfterNothing.kt"); + } + @TestMetadata("smartCastOnWhen.kt") public void testSmartCastOnWhen() throws Exception { runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnWhen.kt"); diff --git a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestWithStdlibGenerated.java b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestWithStdlibGenerated.java index 80d4cf0b94e..a2115cf703d 100644 --- a/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestWithStdlibGenerated.java +++ b/compiler/fir/analysis-tests/tests/org/jetbrains/kotlin/fir/FirOldFrontendDiagnosticsTestWithStdlibGenerated.java @@ -2058,6 +2058,11 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38667.kt"); } + @TestMetadata("kt38766.kt") + public void testKt38766() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.kt"); + } + @TestMetadata("nestedLambdaInferenceWithListMap.kt") public void testNestedLambdaInferenceWithListMap() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/nestedLambdaInferenceWithListMap.kt"); @@ -2925,6 +2930,16 @@ public class FirOldFrontendDiagnosticsTestWithStdlibGenerated extends AbstractFi runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt38143.kt"); } + @TestMetadata("kt38737.kt") + public void testKt38737() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.kt"); + } + + @TestMetadata("kt38801.kt") + public void testKt38801() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt38801.kt"); + } + @TestMetadata("kt4975.kt") public void testKt4975() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt"); diff --git a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java index 9578e5f22f0..c3a75646d61 100644 --- a/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java +++ b/compiler/fir/fir2ir/tests/org/jetbrains/kotlin/codegen/ir/FirBlackBoxCodegenTestGenerated.java @@ -12504,6 +12504,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/inference/kt36446.kt"); } + @TestMetadata("kt38664.kt") + public void testKt38664() throws Exception { + runTest("compiler/testData/codegen/box/inference/kt38664.kt"); + } + @TestMetadata("kt39824.kt") public void testKt39824() throws Exception { runTest("compiler/testData/codegen/box/inference/kt39824.kt"); @@ -30711,6 +30716,11 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT runTest("compiler/testData/codegen/box/vararg/notInLastPosition.kt"); } + @TestMetadata("referenceToContainsFromVarargParameter.kt") + public void testReferenceToContainsFromVarargParameter() throws Exception { + runTest("compiler/testData/codegen/box/vararg/referenceToContainsFromVarargParameter.kt"); + } + @TestMetadata("singleAssignmentToVarargsInFunction.kt") public void testSingleAssignmentToVarargsInFunction() throws Exception { runTest("compiler/testData/codegen/box/vararg/singleAssignmentToVarargsInFunction.kt"); diff --git a/compiler/testData/codegen/box/inference/kt38664.kt b/compiler/testData/codegen/box/inference/kt38664.kt new file mode 100644 index 00000000000..901a21cab17 --- /dev/null +++ b/compiler/testData/codegen/box/inference/kt38664.kt @@ -0,0 +1,40 @@ +// IGNORE_BACKEND_FIR: JVM_IR +// IGNORE_BACKEND: JS + +interface C { + fun foo(a: A): B + + companion object { + inline fun inlinefun(crossinline fooParam: (A) -> B): C { + return object : C { + override fun foo(a: A) = fooParam(a) + } + } + } +} + + +data class A(val s: String) { + companion object : C by C.inlinefun( + fooParam = { it.s } + ) +} + +class OtherB { + var a: String? = null +} + +data class B(val a: A?) { + companion object : C by C.inlinefun( + fooParam = { + OtherB().apply { + a = it.a?.let(A::foo) + } + } + ) +} + +fun box(): String { + val b = B(A("OK")) + return B.foo(b).a ?: "fail" +} \ No newline at end of file diff --git a/compiler/testData/codegen/box/vararg/referenceToContainsFromVarargParameter.kt b/compiler/testData/codegen/box/vararg/referenceToContainsFromVarargParameter.kt new file mode 100644 index 00000000000..bdcbc36148a --- /dev/null +++ b/compiler/testData/codegen/box/vararg/referenceToContainsFromVarargParameter.kt @@ -0,0 +1,12 @@ +// KJS_WITH_FULL_RUNTIME +// WITH_RUNTIME + +fun foo(l: List, vararg values: Any): Boolean = + l.any(values::contains) + +fun box(): String { + if (!foo(listOf("OK"), "OK")) return "fail 1" + if (foo(listOf("none", "OK"))) return "fail 2" + + return "OK" +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.fir.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.fir.kt new file mode 100644 index 00000000000..b510186161b --- /dev/null +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.fir.kt @@ -0,0 +1,22 @@ +// WITH_RUNTIME +// !DIAGNOSTICS: -UNUSED_PARAMETER + +import kotlin.reflect.KProperty + +abstract class MainActivity : DIAware1() { + val bar: Bar by instance1() +} + +class Bar + +open class DIAware1 { + inline fun DIAware1.instance1(tag: Any? = null): DIProperty = TODO() +} + +class DIProperty : LazyDelegate { + override fun provideDelegate(receiver: Any?, prop: KProperty): Lazy = TODO() +} + +interface LazyDelegate { + operator fun provideDelegate(receiver: Any?, prop: KProperty): Lazy +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.kt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.kt new file mode 100644 index 00000000000..b3eeb409102 --- /dev/null +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.kt @@ -0,0 +1,22 @@ +// WITH_RUNTIME +// !DIAGNOSTICS: -UNUSED_PARAMETER + +import kotlin.reflect.KProperty + +abstract class MainActivity : DIAware1() { + val bar: Bar by instance1() +} + +class Bar + +open class DIAware1 { + inline fun DIAware1.instance1(tag: Any? = null): DIProperty = TODO() +} + +class DIProperty : LazyDelegate { + override fun provideDelegate(receiver: Any?, prop: KProperty): Lazy = TODO() +} + +interface LazyDelegate { + operator fun provideDelegate(receiver: Any?, prop: KProperty): Lazy +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.txt b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.txt new file mode 100644 index 00000000000..213aac62e10 --- /dev/null +++ b/compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.txt @@ -0,0 +1,40 @@ +package + +public final class Bar { + public constructor Bar() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public open class DIAware1 { + public constructor DIAware1() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + public final inline fun DIAware1.instance1(/*0*/ tag: kotlin.Any? = ...): DIProperty +} + +public final class DIProperty : LazyDelegate { + public constructor DIProperty() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ fun provideDelegate(/*0*/ receiver: kotlin.Any?, /*1*/ prop: kotlin.reflect.KProperty): kotlin.Lazy + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public interface LazyDelegate { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public abstract operator fun provideDelegate(/*0*/ receiver: kotlin.Any?, /*1*/ prop: kotlin.reflect.KProperty): kotlin.Lazy + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public abstract class MainActivity : DIAware1 { + public constructor MainActivity() + public final val bar: Bar + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String + public final override /*1*/ inline /*fake_override*/ fun DIAware1.instance1(/*0*/ tag: kotlin.Any? = ...): DIProperty +} diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt38549.kt b/compiler/testData/diagnostics/tests/inference/regressions/kt38549.kt new file mode 100644 index 00000000000..6939fa064b6 --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt38549.kt @@ -0,0 +1,18 @@ +// FIR_IDENTICAL +// !DIAGNOSTICS: -UNUSED_PARAMETER + +fun test(b: TestRepo) { + coEvery1 { b.save(any()) } +} + +fun coEvery1(stubBlock: suspend MockKMatcherScope.() -> T) {} + +class MockKMatcherScope { + inline fun any(): T = TODO() +} + +class TestRepo : CrudRepository + +interface CrudRepository { + fun save(entity: S): S = TODO() +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/inference/regressions/kt38549.txt b/compiler/testData/diagnostics/tests/inference/regressions/kt38549.txt new file mode 100644 index 00000000000..10d659adf10 --- /dev/null +++ b/compiler/testData/diagnostics/tests/inference/regressions/kt38549.txt @@ -0,0 +1,27 @@ +package + +public fun coEvery1(/*0*/ stubBlock: suspend MockKMatcherScope.() -> T): kotlin.Unit +public fun test(/*0*/ b: TestRepo): kotlin.Unit + +public interface CrudRepository { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open fun save(/*0*/ entity: S): S + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class MockKMatcherScope { + public constructor MockKMatcherScope() + public final inline fun any(): T + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class TestRepo : CrudRepository { + public constructor TestRepo() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun save(/*0*/ entity: S): S + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/tests/smartCasts/smartCastOnLastExpressionOfLambdaAfterNothing.fir.kt b/compiler/testData/diagnostics/tests/smartCasts/smartCastOnLastExpressionOfLambdaAfterNothing.fir.kt new file mode 100644 index 00000000000..82414b8ec42 --- /dev/null +++ b/compiler/testData/diagnostics/tests/smartCasts/smartCastOnLastExpressionOfLambdaAfterNothing.fir.kt @@ -0,0 +1,14 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER + +class Inv + +fun foo(f: () -> T): Inv = TODO() + +fun myExit(): Nothing = TODO() + +fun test(x: String?): Inv { + return foo { + if (x == null) myExit() + x + } +} diff --git a/compiler/testData/diagnostics/tests/smartCasts/smartCastOnLastExpressionOfLambdaAfterNothing.kt b/compiler/testData/diagnostics/tests/smartCasts/smartCastOnLastExpressionOfLambdaAfterNothing.kt new file mode 100644 index 00000000000..012da80188e --- /dev/null +++ b/compiler/testData/diagnostics/tests/smartCasts/smartCastOnLastExpressionOfLambdaAfterNothing.kt @@ -0,0 +1,14 @@ +// !DIAGNOSTICS: -UNUSED_PARAMETER + +class Inv + +fun foo(f: () -> T): Inv = TODO() + +fun myExit(): Nothing = TODO() + +fun test(x: String?): Inv { + return foo { + if (x == null) myExit() + x + } +} diff --git a/compiler/testData/diagnostics/tests/smartCasts/smartCastOnLastExpressionOfLambdaAfterNothing.txt b/compiler/testData/diagnostics/tests/smartCasts/smartCastOnLastExpressionOfLambdaAfterNothing.txt new file mode 100644 index 00000000000..b04c800ffd3 --- /dev/null +++ b/compiler/testData/diagnostics/tests/smartCasts/smartCastOnLastExpressionOfLambdaAfterNothing.txt @@ -0,0 +1,12 @@ +package + +public fun foo(/*0*/ f: () -> T): Inv +public fun myExit(): kotlin.Nothing +public fun test(/*0*/ x: kotlin.String?): Inv + +public final class Inv { + public constructor Inv() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.kt new file mode 100644 index 00000000000..7cdbeac28a2 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.kt @@ -0,0 +1,22 @@ +// FIR_IDENTICAL +// !USE_EXPERIMENTAL: kotlin.RequiresOptIn +// !DIAGNOSTICS: -UNUSED_PARAMETER + +import kotlin.experimental.ExperimentalTypeInference + +inline fun emptyFlow(crossinline transform: suspend (Array) -> R): Flow1 = + flow1 { emit(transform(emptyArray())) } + +inline fun emptyFlow(crossinline transform: (Array) -> R): Flow1 = + flowOf1(transform(emptyArray())) + +fun flowOf1(value: T): Flow1 = TODO() + +@OptIn(ExperimentalTypeInference::class) +fun flow1(@BuilderInference block: suspend FlowCollector1.() -> Unit): Flow1 = TODO() + +interface FlowCollector1 { + suspend fun emit(value: T) +} + +interface Flow1 \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.txt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.txt new file mode 100644 index 00000000000..e5bb97732f6 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.txt @@ -0,0 +1,19 @@ +package + +public inline fun emptyFlow(/*0*/ crossinline transform: (kotlin.Array) -> R): Flow1 +public inline fun emptyFlow(/*0*/ crossinline transform: suspend (kotlin.Array) -> R): Flow1 +@kotlin.OptIn(markerClass = {kotlin.experimental.ExperimentalTypeInference::class}) public fun flow1(/*0*/ @kotlin.BuilderInference block: suspend FlowCollector1.() -> kotlin.Unit): Flow1 +public fun flowOf1(/*0*/ value: T): Flow1 + +public interface Flow1 { + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public interface FlowCollector1 { + public abstract suspend fun emit(/*0*/ value: T): kotlin.Unit + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.fir.kt new file mode 100644 index 00000000000..b8e71f703a8 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.fir.kt @@ -0,0 +1,13 @@ +private const val dateRangeStart: String = "2020-01-01" +private const val dateRangeEnd: String = "2020-05-01" + +private fun String?.toIconList(): List = when (this) { + null -> listOf("DATE_IS_NULL") + in dateRangeStart..dateRangeEnd -> emptyList() + else -> listOf("DATE_IS_OUT_OF_RANGE") +} + +fun main() { + println("2019-12-31".toIconList()) + println(null.toIconList()) +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.kt new file mode 100644 index 00000000000..5463106dd84 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.kt @@ -0,0 +1,13 @@ +private const val dateRangeStart: String = "2020-01-01" +private const val dateRangeEnd: String = "2020-05-01" + +private fun String?.toIconList(): List = when (this) { + null -> listOf("DATE_IS_NULL") + in dateRangeStart..dateRangeEnd -> emptyList() + else -> listOf("DATE_IS_OUT_OF_RANGE") +} + +fun main() { + println("2019-12-31".toIconList()) + println(null.toIconList()) +} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.txt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.txt new file mode 100644 index 00000000000..db6de40332a --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.txt @@ -0,0 +1,6 @@ +package + +private const val dateRangeEnd: kotlin.String = "2020-05-01" +private const val dateRangeStart: kotlin.String = "2020-01-01" +public fun main(): kotlin.Unit +private fun kotlin.String?.toIconList(): kotlin.collections.List diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt38801.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt38801.kt new file mode 100644 index 00000000000..12def63f39d --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt38801.kt @@ -0,0 +1,17 @@ +// FIR_IDENTICAL +// !DIAGNOSTICS: -UNUSED_PARAMETER + +open class A { + open val servers: List + get() = findAndExpand({ "hi" }) + .mapNotNull { B.foo(it) } + + fun findAndExpand(vararg path: () -> String): List = TODO() +} + +object B { + inline fun foo(bar: String?): T? = TODO() +} + +open class C +class D : C() \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/kt38801.txt b/compiler/testData/diagnostics/testsWithStdLib/inference/kt38801.txt new file mode 100644 index 00000000000..393bca4f148 --- /dev/null +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/kt38801.txt @@ -0,0 +1,32 @@ +package + +public open class A { + public constructor A() + public open val servers: kotlin.collections.List + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public final fun findAndExpand(/*0*/ vararg path: () -> kotlin.String /*kotlin.Array kotlin.String>*/): kotlin.collections.List + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public object B { + private constructor B() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public final inline fun foo(/*0*/ bar: kotlin.String?): T? + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public open class C { + public constructor C() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} + +public final class D : C { + public constructor D() + public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean + public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int + public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String +} diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java index 7cd4afb8277..6edeccc5e49 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestGenerated.java @@ -6218,6 +6218,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.kt"); } + @TestMetadata("kt38714.kt") + public void testKt38714() throws Exception { + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.kt"); + } + @TestMetadata("localDelegatedProperty.kt") public void testLocalDelegatedProperty() throws Exception { runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/localDelegatedProperty.kt"); @@ -11929,6 +11934,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali runTest("compiler/testData/diagnostics/tests/inference/regressions/kt37650.kt"); } + @TestMetadata("kt38549.kt") + public void testKt38549() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt38549.kt"); + } + @TestMetadata("kt38691.kt") public void testKt38691() throws Exception { runTest("compiler/testData/diagnostics/tests/inference/regressions/kt38691.kt"); @@ -21727,6 +21737,11 @@ public class DiagnosticsTestGenerated extends AbstractDiagnosticsTestWithFirVali runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnIf.kt"); } + @TestMetadata("smartCastOnLastExpressionOfLambdaAfterNothing.kt") + public void testSmartCastOnLastExpressionOfLambdaAfterNothing() throws Exception { + runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnLastExpressionOfLambdaAfterNothing.kt"); + } + @TestMetadata("smartCastOnWhen.kt") public void testSmartCastOnWhen() throws Exception { runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnWhen.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java index 36bfd106d81..5b90d4d9219 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/DiagnosticsTestWithStdLibGenerated.java @@ -2098,6 +2098,11 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38667.kt"); } + @TestMetadata("kt38766.kt") + public void testKt38766() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.kt"); + } + @TestMetadata("nestedLambdaInferenceWithListMap.kt") public void testNestedLambdaInferenceWithListMap() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/nestedLambdaInferenceWithListMap.kt"); @@ -3075,6 +3080,16 @@ public class DiagnosticsTestWithStdLibGenerated extends AbstractDiagnosticsTestW runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt38143.kt"); } + @TestMetadata("kt38737.kt") + public void testKt38737() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.kt"); + } + + @TestMetadata("kt38801.kt") + public void testKt38801() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt38801.kt"); + } + @TestMetadata("kt4975.kt") public void testKt4975() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java index a57fdbee2e7..d8ebbe3c84c 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsTestWithStdLibUsingJavacGenerated.java @@ -2098,6 +2098,11 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38667.kt"); } + @TestMetadata("kt38766.kt") + public void testKt38766() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/kt38766.kt"); + } + @TestMetadata("nestedLambdaInferenceWithListMap.kt") public void testNestedLambdaInferenceWithListMap() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/coroutines/inference/nestedLambdaInferenceWithListMap.kt"); @@ -3075,6 +3080,16 @@ public class DiagnosticsTestWithStdLibUsingJavacGenerated extends AbstractDiagno runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt38143.kt"); } + @TestMetadata("kt38737.kt") + public void testKt38737() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt38737.kt"); + } + + @TestMetadata("kt38801.kt") + public void testKt38801() throws Exception { + runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt38801.kt"); + } + @TestMetadata("kt4975.kt") public void testKt4975() throws Exception { runTest("compiler/testData/diagnostics/testsWithStdLib/inference/kt4975.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java index 16d4f46eed8..d120607577d 100644 --- a/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/checkers/javac/DiagnosticsUsingJavacTestGenerated.java @@ -6213,6 +6213,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/inferenceFromReceiver2.kt"); } + @TestMetadata("kt38714.kt") + public void testKt38714() throws Exception { + runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/kt38714.kt"); + } + @TestMetadata("localDelegatedProperty.kt") public void testLocalDelegatedProperty() throws Exception { runTest("compiler/testData/diagnostics/tests/delegatedProperty/provideDelegate/localDelegatedProperty.kt"); @@ -11924,6 +11929,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing runTest("compiler/testData/diagnostics/tests/inference/regressions/kt37650.kt"); } + @TestMetadata("kt38549.kt") + public void testKt38549() throws Exception { + runTest("compiler/testData/diagnostics/tests/inference/regressions/kt38549.kt"); + } + @TestMetadata("kt38691.kt") public void testKt38691() throws Exception { runTest("compiler/testData/diagnostics/tests/inference/regressions/kt38691.kt"); @@ -21652,6 +21662,11 @@ public class DiagnosticsUsingJavacTestGenerated extends AbstractDiagnosticsUsing runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnIf.kt"); } + @TestMetadata("smartCastOnLastExpressionOfLambdaAfterNothing.kt") + public void testSmartCastOnLastExpressionOfLambdaAfterNothing() throws Exception { + runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnLastExpressionOfLambdaAfterNothing.kt"); + } + @TestMetadata("smartCastOnWhen.kt") public void testSmartCastOnWhen() throws Exception { runTest("compiler/testData/diagnostics/tests/smartCasts/smartCastOnWhen.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java index e7e46c74c11..8cdf9d2208a 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/BlackBoxCodegenTestGenerated.java @@ -13729,6 +13729,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/inference/kt36446.kt"); } + @TestMetadata("kt38664.kt") + public void testKt38664() throws Exception { + runTest("compiler/testData/codegen/box/inference/kt38664.kt"); + } + @TestMetadata("kt39824.kt") public void testKt39824() throws Exception { runTest("compiler/testData/codegen/box/inference/kt39824.kt"); @@ -32307,6 +32312,11 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest { runTest("compiler/testData/codegen/box/vararg/notInLastPosition.kt"); } + @TestMetadata("referenceToContainsFromVarargParameter.kt") + public void testReferenceToContainsFromVarargParameter() throws Exception { + runTest("compiler/testData/codegen/box/vararg/referenceToContainsFromVarargParameter.kt"); + } + @TestMetadata("singleAssignmentToVarargsInFunction.kt") public void testSingleAssignmentToVarargsInFunction() throws Exception { runTest("compiler/testData/codegen/box/vararg/singleAssignmentToVarargsInFunction.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java index 5eeec7a436c..f2e9906e4d4 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java @@ -13729,6 +13729,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/inference/kt36446.kt"); } + @TestMetadata("kt38664.kt") + public void testKt38664() throws Exception { + runTest("compiler/testData/codegen/box/inference/kt38664.kt"); + } + @TestMetadata("kt39824.kt") public void testKt39824() throws Exception { runTest("compiler/testData/codegen/box/inference/kt39824.kt"); @@ -29941,6 +29946,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes runTest("compiler/testData/codegen/box/vararg/notInLastPosition.kt"); } + @TestMetadata("referenceToContainsFromVarargParameter.kt") + public void testReferenceToContainsFromVarargParameter() throws Exception { + runTest("compiler/testData/codegen/box/vararg/referenceToContainsFromVarargParameter.kt"); + } + @TestMetadata("singleAssignmentToVarargsInFunction.kt") public void testSingleAssignmentToVarargsInFunction() throws Exception { runTest("compiler/testData/codegen/box/vararg/singleAssignmentToVarargsInFunction.kt"); diff --git a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java index 36c24ba7f81..e16f70f66cd 100644 --- a/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java +++ b/compiler/tests/org/jetbrains/kotlin/codegen/ir/IrBlackBoxCodegenTestGenerated.java @@ -12504,6 +12504,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/inference/kt36446.kt"); } + @TestMetadata("kt38664.kt") + public void testKt38664() throws Exception { + runTest("compiler/testData/codegen/box/inference/kt38664.kt"); + } + @TestMetadata("kt39824.kt") public void testKt39824() throws Exception { runTest("compiler/testData/codegen/box/inference/kt39824.kt"); @@ -30711,6 +30716,11 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes runTest("compiler/testData/codegen/box/vararg/notInLastPosition.kt"); } + @TestMetadata("referenceToContainsFromVarargParameter.kt") + public void testReferenceToContainsFromVarargParameter() throws Exception { + runTest("compiler/testData/codegen/box/vararg/referenceToContainsFromVarargParameter.kt"); + } + @TestMetadata("singleAssignmentToVarargsInFunction.kt") public void testSingleAssignmentToVarargsInFunction() throws Exception { runTest("compiler/testData/codegen/box/vararg/singleAssignmentToVarargsInFunction.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java index 5dd9cb03c72..2767b3853cd 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java @@ -10764,6 +10764,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/inference/kt36446.kt"); } + @TestMetadata("kt38664.kt") + public void testKt38664() throws Exception { + runTest("compiler/testData/codegen/box/inference/kt38664.kt"); + } + @TestMetadata("kt39824.kt") public void testKt39824() throws Exception { runTest("compiler/testData/codegen/box/inference/kt39824.kt"); @@ -25007,6 +25012,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes runTest("compiler/testData/codegen/box/vararg/kt796_797.kt"); } + @TestMetadata("referenceToContainsFromVarargParameter.kt") + public void testReferenceToContainsFromVarargParameter() throws Exception { + runTest("compiler/testData/codegen/box/vararg/referenceToContainsFromVarargParameter.kt"); + } + @TestMetadata("singleAssignmentToVarargsInFunction.kt") public void testSingleAssignmentToVarargsInFunction() throws Exception { runTest("compiler/testData/codegen/box/vararg/singleAssignmentToVarargsInFunction.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java index b8126762ae4..3e5431bc7cb 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java @@ -10764,6 +10764,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inference/kt36446.kt"); } + @TestMetadata("kt38664.kt") + public void testKt38664() throws Exception { + runTest("compiler/testData/codegen/box/inference/kt38664.kt"); + } + @TestMetadata("kt39824.kt") public void testKt39824() throws Exception { runTest("compiler/testData/codegen/box/inference/kt39824.kt"); @@ -25007,6 +25012,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest { runTest("compiler/testData/codegen/box/vararg/kt796_797.kt"); } + @TestMetadata("referenceToContainsFromVarargParameter.kt") + public void testReferenceToContainsFromVarargParameter() throws Exception { + runTest("compiler/testData/codegen/box/vararg/referenceToContainsFromVarargParameter.kt"); + } + @TestMetadata("singleAssignmentToVarargsInFunction.kt") public void testSingleAssignmentToVarargsInFunction() throws Exception { runTest("compiler/testData/codegen/box/vararg/singleAssignmentToVarargsInFunction.kt"); diff --git a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java index f9be5685134..f655f270c86 100644 --- a/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java +++ b/js/js.tests/test/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java @@ -10829,6 +10829,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/inference/kt36446.kt"); } + @TestMetadata("kt38664.kt") + public void testKt38664() throws Exception { + runTest("compiler/testData/codegen/box/inference/kt38664.kt"); + } + @TestMetadata("kt39824.kt") public void testKt39824() throws Exception { runTest("compiler/testData/codegen/box/inference/kt39824.kt"); @@ -25022,6 +25027,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest { runTest("compiler/testData/codegen/box/vararg/kt796_797.kt"); } + @TestMetadata("referenceToContainsFromVarargParameter.kt") + public void testReferenceToContainsFromVarargParameter() throws Exception { + runTest("compiler/testData/codegen/box/vararg/referenceToContainsFromVarargParameter.kt"); + } + @TestMetadata("singleAssignmentToVarargsInFunction.kt") public void testSingleAssignmentToVarargsInFunction() throws Exception { runTest("compiler/testData/codegen/box/vararg/singleAssignmentToVarargsInFunction.kt");