diff --git a/compiler/fir/resolve/testData/resolve/problems/ambiguityOnExtensionFunctions.kt b/compiler/fir/resolve/testData/resolve/problems/ambiguityOnExtensionFunctions.kt new file mode 100644 index 00000000000..3c72599aae3 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/ambiguityOnExtensionFunctions.kt @@ -0,0 +1,13 @@ +interface A + +interface B : A + +val A.name: String? + get() = "" + +val B?.name: String? + get() = "" + +fun test(b: B) { + val id = b.name +} diff --git a/compiler/fir/resolve/testData/resolve/problems/ambiguityOnExtensionFunctions.txt b/compiler/fir/resolve/testData/resolve/problems/ambiguityOnExtensionFunctions.txt new file mode 100644 index 00000000000..df045ccb742 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/ambiguityOnExtensionFunctions.txt @@ -0,0 +1,16 @@ +FILE: ambiguityOnExtensionFunctions.kt + public abstract interface A : R|kotlin/Any| { + } + public abstract interface B : R|A| { + } + public final val R|A|.name: R|kotlin/String?| + public get(): R|kotlin/String?| { + ^ String() + } + public final val R|B?|.name: R|kotlin/String?| + public get(): R|kotlin/String?| { + ^ String() + } + public final fun test(b: R|B|): R|kotlin/Unit| { + lval id: = R|/b|.# + } diff --git a/compiler/fir/resolve/testData/resolve/problems/bareTypes.kt b/compiler/fir/resolve/testData/resolve/problems/bareTypes.kt new file mode 100644 index 00000000000..5b844150b3f --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/bareTypes.kt @@ -0,0 +1,9 @@ +interface A + +interface MutableA : A { + fun add(x: T) +} + +fun test(a: A) { + (a as MutableA).add("") +} diff --git a/compiler/fir/resolve/testData/resolve/problems/bareTypes.txt b/compiler/fir/resolve/testData/resolve/problems/bareTypes.txt new file mode 100644 index 00000000000..c42d5f5f19d --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/bareTypes.txt @@ -0,0 +1,10 @@ +FILE: bareTypes.kt + public abstract interface A : R|kotlin/Any| { + } + public abstract interface MutableA : R|A| { + public abstract fun add(x: R|T|): R|kotlin/Unit| + + } + public final fun test(a: R|A|): R|kotlin/Unit| { + (R|/a| as R|MutableA|).#(String()) + } diff --git a/compiler/fir/resolve/testData/resolve/problems/callableReferenceOnInstance.kt b/compiler/fir/resolve/testData/resolve/problems/callableReferenceOnInstance.kt new file mode 100644 index 00000000000..bf2bb4d0fde --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/callableReferenceOnInstance.kt @@ -0,0 +1,13 @@ +interface KaptLogger { + val isVerbose: Boolean + + fun warn(message: String) + fun error(message: String) +} + +fun test(logger: KaptLogger) { + val func = if (logger.isVerbose) + logger::warn + else + logger::error +} \ No newline at end of file diff --git a/compiler/fir/resolve/testData/resolve/problems/callableReferenceOnInstance.txt b/compiler/fir/resolve/testData/resolve/problems/callableReferenceOnInstance.txt new file mode 100644 index 00000000000..1db14b09632 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/callableReferenceOnInstance.txt @@ -0,0 +1,21 @@ +FILE: callableReferenceOnInstance.kt + public abstract interface KaptLogger : R|kotlin/Any| { + public abstract val isVerbose: R|kotlin/Boolean| + public get(): R|kotlin/Boolean| + + public abstract fun warn(message: R|kotlin/String|): R|kotlin/Unit| + + public abstract fun error(message: R|kotlin/String|): R|kotlin/Unit| + + } + public final fun test(logger: R|KaptLogger|): R|kotlin/Unit| { + lval func: R|kotlin/Nothing| = when () { + R|/logger|.R|/KaptLogger.isVerbose| -> { + R|/logger|::# + } + else -> { + R|/logger|::# + } + } + + } diff --git a/compiler/fir/resolve/testData/resolve/problems/exhaustiveWhenAndFlexibleType.kt b/compiler/fir/resolve/testData/resolve/problems/exhaustiveWhenAndFlexibleType.kt new file mode 100644 index 00000000000..8b85624339c --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/exhaustiveWhenAndFlexibleType.kt @@ -0,0 +1,23 @@ +// FILE: Utils.java + +public class Utils { + public static E getEnum() { + return null; + } +} + +// FILE: main.kt + +enum class E { + A, B, C +} + +fun test() { + val e = Utils.getEnum() + val s = when (e) { + E.A, null -> return + E.B -> "" + E.C -> "" + } + s.length +} diff --git a/compiler/fir/resolve/testData/resolve/problems/exhaustiveWhenAndFlexibleType.txt b/compiler/fir/resolve/testData/resolve/problems/exhaustiveWhenAndFlexibleType.txt new file mode 100644 index 00000000000..27951a60548 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/exhaustiveWhenAndFlexibleType.txt @@ -0,0 +1,50 @@ +FILE: main.kt + public final enum class E : R|kotlin/Enum| { + private constructor(): R|E| { + super() + } + + public final static enum entry A: R|E| = object : R|E| { + private constructor(): R|anonymous| { + super() + } + + } + + public final static enum entry B: R|E| = object : R|E| { + private constructor(): R|anonymous| { + super() + } + + } + + public final static enum entry C: R|E| = object : R|E| { + private constructor(): R|anonymous| { + super() + } + + } + + public final static fun values(): R|kotlin/Array| { + } + + public final static fun valueOf(value: R|kotlin/String|): R|E| { + } + + } + public final fun test(): R|kotlin/Unit| { + lval e: R|ft!| = Q|Utils|.R|/Utils.getEnum|() + lval s: R|kotlin/Unit| = when (R|/e|) { + ==($subj$, Q|E|.R|/E.A|) || ==($subj$, Null(null)) -> { + ^test Unit + } + ==($subj$, Q|E|.R|/E.B|) -> { + String() + } + ==($subj$, Q|E|.R|/E.C|) -> { + String() + } + } + + R|/s|.# + } diff --git a/compiler/fir/resolve/testData/resolve/problems/incorrectSuperCall.kt b/compiler/fir/resolve/testData/resolve/problems/incorrectSuperCall.kt new file mode 100644 index 00000000000..336125e9a9e --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/incorrectSuperCall.kt @@ -0,0 +1,16 @@ +interface A { + fun bar() {} +} +open class B { + open fun foo() {} + + open fun bar() {} +} + +class C : A, B() { + override fun foo() { + super.foo() + + super.bar() // should be ambiguity + } +} diff --git a/compiler/fir/resolve/testData/resolve/problems/incorrectSuperCall.txt b/compiler/fir/resolve/testData/resolve/problems/incorrectSuperCall.txt new file mode 100644 index 00000000000..ccc556f4b13 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/incorrectSuperCall.txt @@ -0,0 +1,29 @@ +FILE: incorrectSuperCall.kt + public abstract interface A : R|kotlin/Any| { + public open fun bar(): R|kotlin/Unit| { + } + + } + public open class B : R|kotlin/Any| { + public constructor(): R|B| { + super() + } + + public open fun foo(): R|kotlin/Unit| { + } + + public open fun bar(): R|kotlin/Unit| { + } + + } + public final class C : R|A|, R|B| { + public constructor(): R|C| { + super() + } + + public final override fun foo(): R|kotlin/Unit| { + super.#() + super.R|/A.bar|() + } + + } diff --git a/compiler/fir/resolve/testData/resolve/problems/iteratorOfVararg.kt b/compiler/fir/resolve/testData/resolve/problems/iteratorOfVararg.kt new file mode 100644 index 00000000000..17d53924e4c --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/iteratorOfVararg.kt @@ -0,0 +1,13 @@ +class Foo(vararg val strings: String) + +fun test_1(foo: Foo) { + for (s in foo.strings) { + s.length + } +} + +fun test_2(vararg strings: String) { + for (s in strings) { + s.length + } +} diff --git a/compiler/fir/resolve/testData/resolve/problems/iteratorOfVararg.txt b/compiler/fir/resolve/testData/resolve/problems/iteratorOfVararg.txt new file mode 100644 index 00000000000..1c245235332 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/iteratorOfVararg.txt @@ -0,0 +1,28 @@ +FILE: iteratorOfVararg.kt + public final class Foo : R|kotlin/Any| { + public constructor(vararg strings: R|kotlin/Array|): R|Foo| { + super() + } + + public final val strings: R|kotlin/String| = R|/strings| + public get(): R|kotlin/String| + + } + public final fun test_1(foo: R|Foo|): R|kotlin/Unit| { + lval : R|kotlin/String| = R|/foo|.R|/Foo.strings| + lval : = R|/|.#() + while(R|/|.#()) { + lval s: = R|/|.#() + R|/s|.# + } + + } + public final fun test_2(vararg strings: R|kotlin/Array|): R|kotlin/Unit| { + lval : R|kotlin/Array| = R|/strings| + lval : R|kotlin/collections/Iterator| = R|/|.R|FakeOverride|>|() + while(R|/|.R|kotlin/collections/Iterator.hasNext|()) { + lval s: R|kotlin/String| = R|/|.R|FakeOverride|() + R|/s|.R|kotlin/String.length| + } + + } diff --git a/compiler/fir/resolve/testData/resolve/problems/noBoundSmartcastAfterContinue.kt b/compiler/fir/resolve/testData/resolve/problems/noBoundSmartcastAfterContinue.kt new file mode 100644 index 00000000000..9b45b6a5aed --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/noBoundSmartcastAfterContinue.kt @@ -0,0 +1,14 @@ +interface A { + val s: String +} + +fun test(list: List) { + var goodA: A? = null + for (a in list) { + if (goodA == null) { + goodA = a + continue + } + goodA.s + } +} diff --git a/compiler/fir/resolve/testData/resolve/problems/noBoundSmartcastAfterContinue.txt b/compiler/fir/resolve/testData/resolve/problems/noBoundSmartcastAfterContinue.txt new file mode 100644 index 00000000000..75c9840af3b --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/problems/noBoundSmartcastAfterContinue.txt @@ -0,0 +1,23 @@ +FILE: noBoundSmartcastAfterContinue.kt + public abstract interface A : R|kotlin/Any| { + public abstract val s: R|kotlin/String| + public get(): R|kotlin/String| + + } + public final fun test(list: R|kotlin/collections/List|): R|kotlin/Unit| { + lvar goodA: R|A?| = Null(null) + lval : R|kotlin/collections/List| = R|/list| + lval : R|kotlin/collections/Iterator| = R|/|.R|FakeOverride|>|() + while(R|/|.R|kotlin/collections/Iterator.hasNext|()) { + lval a: R|A| = R|/|.R|FakeOverride|() + when () { + ==(R|/goodA|, Null(null)) -> { + R|/goodA| = R|/a| + continue@@@[R|/|.R|kotlin/collections/Iterator.hasNext|()] + } + } + + R|/goodA|.# + } + + } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/arrayFilterCapturedType.kt b/compiler/fir/resolve/testData/resolve/stdlib/problems/arrayFilterCapturedType.kt new file mode 100644 index 00000000000..54b76401f75 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/arrayFilterCapturedType.kt @@ -0,0 +1,3 @@ +fun test(elements: Array) { + val filtered = elements.filterNotNull() +} diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/arrayFilterCapturedType.txt b/compiler/fir/resolve/testData/resolve/stdlib/problems/arrayFilterCapturedType.txt new file mode 100644 index 00000000000..95c35ff8f3c --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/arrayFilterCapturedType.txt @@ -0,0 +1,4 @@ +FILE: arrayFilterCapturedType.kt + public final fun test(elements: R|kotlin/Array|): R|kotlin/Unit| { + lval filtered: = R|/elements|.#() + } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/delegateTypeMismatch.kt b/compiler/fir/resolve/testData/resolve/stdlib/problems/delegateTypeMismatch.kt new file mode 100644 index 00000000000..f98bae24319 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/delegateTypeMismatch.kt @@ -0,0 +1,26 @@ +import kotlin.properties.Delegates +import kotlin.properties.ReadWriteProperty + +interface ClassifierNamePolicy { + object SOURCE_CODE_QUALIFIED : ClassifierNamePolicy +} + +interface KotlinType + +class A(val isLocked: Boolean) { + private fun property(initialValue: T): ReadWriteProperty { + return Delegates.vetoable(initialValue) { _, _, _ -> + if (isLocked) { + throw IllegalStateException("Cannot modify readonly DescriptorRendererOptions") + } + else { + true + } + } + } + + var classifierNamePolicy: ClassifierNamePolicy by property(ClassifierNamePolicy.SOURCE_CODE_QUALIFIED) + // getter has INAPPLICABLE diagnostic, see dump + + var typeNormalizer by property<(KotlinType) -> KotlinType>({ it }) +} diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/delegateTypeMismatch.txt b/compiler/fir/resolve/testData/resolve/stdlib/problems/delegateTypeMismatch.txt new file mode 100644 index 00000000000..8855160b878 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/delegateTypeMismatch.txt @@ -0,0 +1,55 @@ +FILE: delegateTypeMismatch.kt + public abstract interface ClassifierNamePolicy : R|kotlin/Any| { + public final object SOURCE_CODE_QUALIFIED : R|ClassifierNamePolicy| { + private constructor(): R|ClassifierNamePolicy.SOURCE_CODE_QUALIFIED| { + super() + } + + } + + } + public abstract interface KotlinType : R|kotlin/Any| { + } + public final class A : R|kotlin/Any| { + public constructor(isLocked: R|kotlin/Boolean|): R|A| { + super() + } + + public final val isLocked: R|kotlin/Boolean| = R|/isLocked| + public get(): R|kotlin/Boolean| + + private final fun property(initialValue: R|T|): R|kotlin/properties/ReadWriteProperty| { + ^property Q|kotlin/properties/Delegates|.R|kotlin/properties/Delegates.vetoable|(R|/initialValue|, = vetoable@fun (_: R|kotlin/reflect/KProperty<*>|, _: R|T|, _: R|T|): R|kotlin/Boolean| { + when () { + this@R|/A|.R|/A.isLocked| -> { + throw R|java/lang/IllegalStateException.IllegalStateException|(String(Cannot modify readonly DescriptorRendererOptions)) + } + else -> { + Boolean(true) + } + } + + } + ) + } + + public final var classifierNamePolicy: R|ClassifierNamePolicy|by this@R|/A|.R|/A.property|(Q|ClassifierNamePolicy.SOURCE_CODE_QUALIFIED|) + public get(): R|ClassifierNamePolicy| { + ^ D|/A.classifierNamePolicy|.R|FakeOverride|(this@R|/A|, ::R|/A.classifierNamePolicy|) + } + public set(: R|ClassifierNamePolicy|): R|kotlin/Unit| { + D|/A.classifierNamePolicy|.#(this@R|/A|, ::R|/A.classifierNamePolicy|, R|/classifierNamePolicy|) + } + + public final var typeNormalizer: by # KotlinType|>(property@fun (): R|class error: Unresolved name: it| { + # + } + ) + public get(): { + ^ D|/A.typeNormalizer|.#(this@R|/A|, ::R|/A.typeNormalizer|) + } + public set(: ): R|kotlin/Unit| { + D|/A.typeNormalizer|.#(this@R|/A|, ::R|/A.typeNormalizer|, R|/typeNormalizer|) + } + + } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/functionAndFunctionN.kt b/compiler/fir/resolve/testData/resolve/stdlib/problems/functionAndFunctionN.kt new file mode 100644 index 00000000000..eb6c0a86ad6 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/functionAndFunctionN.kt @@ -0,0 +1,5 @@ +fun takeAnyFun(function: Function<*>) {} + +fun test(block: () -> Unit) { + takeAnyFun(block) +} diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/functionAndFunctionN.txt b/compiler/fir/resolve/testData/resolve/stdlib/problems/functionAndFunctionN.txt new file mode 100644 index 00000000000..1fe3fc5d985 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/functionAndFunctionN.txt @@ -0,0 +1,6 @@ +FILE: functionAndFunctionN.kt + public final fun takeAnyFun(function: R|kotlin/Function<*>|): R|kotlin/Unit| { + } + public final fun test(block: R|() -> kotlin/Unit|): R|kotlin/Unit| { + #(R|/block|) + } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/inapplicableRemoveAll.kt b/compiler/fir/resolve/testData/resolve/stdlib/problems/inapplicableRemoveAll.kt new file mode 100644 index 00000000000..9ba5ff3516f --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/inapplicableRemoveAll.kt @@ -0,0 +1,5 @@ +fun test(list: MutableList) { + list.removeAll { + it.isEmpty() + } +} diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/inapplicableRemoveAll.txt b/compiler/fir/resolve/testData/resolve/stdlib/problems/inapplicableRemoveAll.txt new file mode 100644 index 00000000000..da63032b3aa --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/inapplicableRemoveAll.txt @@ -0,0 +1,7 @@ +FILE: inapplicableRemoveAll.kt + public final fun test(list: R|kotlin/collections/MutableList|): R|kotlin/Unit| { + R|/list|.#( = removeAll@fun (): R|class error: Ambiguity: isEmpty, [kotlin/collections/isEmpty, kotlin/collections/isEmpty, kotlin/collections/isEmpty, kotlin/collections/isEmpty, kotlin/collections/isEmpty, kotlin/collections/isEmpty, kotlin/collections/isEmpty, kotlin/collections/isEmpty, kotlin/collections/isEmpty, kotlin/text/isEmpty]| { + #.#() + } + ) + } diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/toSortedMapWithComparator.kt b/compiler/fir/resolve/testData/resolve/stdlib/problems/toSortedMapWithComparator.kt new file mode 100644 index 00000000000..bb946ff0d30 --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/toSortedMapWithComparator.kt @@ -0,0 +1,3 @@ +fun test(map: Map>) { + val sortedMap = map.toSortedMap(nullsLast()) +} diff --git a/compiler/fir/resolve/testData/resolve/stdlib/problems/toSortedMapWithComparator.txt b/compiler/fir/resolve/testData/resolve/stdlib/problems/toSortedMapWithComparator.txt new file mode 100644 index 00000000000..21d1aa1d6aa --- /dev/null +++ b/compiler/fir/resolve/testData/resolve/stdlib/problems/toSortedMapWithComparator.txt @@ -0,0 +1,4 @@ +FILE: toSortedMapWithComparator.kt + public final fun test(map: R|kotlin/collections/Map>|): R|kotlin/Unit| { + lval sortedMap: = R|/map|.#(R|kotlin/comparisons/nullsLast|()) + } diff --git a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java index 1199a2fd184..174122f52d1 100644 --- a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java +++ b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsTestGenerated.java @@ -1001,11 +1001,26 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest { KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/resolve/testData/resolve/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true); } + @TestMetadata("ambiguityOnExtensionFunctions.kt") + public void testAmbiguityOnExtensionFunctions() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/ambiguityOnExtensionFunctions.kt"); + } + @TestMetadata("asImports.kt") public void testAsImports() throws Exception { runTest("compiler/fir/resolve/testData/resolve/problems/asImports.kt"); } + @TestMetadata("bareTypes.kt") + public void testBareTypes() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/bareTypes.kt"); + } + + @TestMetadata("callableReferenceOnInstance.kt") + public void testCallableReferenceOnInstance() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/callableReferenceOnInstance.kt"); + } + @TestMetadata("covariantArrayAsReceiver.kt") public void testCovariantArrayAsReceiver() throws Exception { runTest("compiler/fir/resolve/testData/resolve/problems/covariantArrayAsReceiver.kt"); @@ -1021,11 +1036,26 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest { runTest("compiler/fir/resolve/testData/resolve/problems/definitelyNotNullAmbiguity.kt"); } + @TestMetadata("exhaustiveWhenAndFlexibleType.kt") + public void testExhaustiveWhenAndFlexibleType() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/exhaustiveWhenAndFlexibleType.kt"); + } + + @TestMetadata("incorrectSuperCall.kt") + public void testIncorrectSuperCall() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/incorrectSuperCall.kt"); + } + @TestMetadata("invokeOfLambdaWithReceiver.kt") public void testInvokeOfLambdaWithReceiver() throws Exception { runTest("compiler/fir/resolve/testData/resolve/problems/invokeOfLambdaWithReceiver.kt"); } + @TestMetadata("iteratorOfVararg.kt") + public void testIteratorOfVararg() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/iteratorOfVararg.kt"); + } + @TestMetadata("javaAccessorConversion.kt") public void testJavaAccessorConversion() throws Exception { runTest("compiler/fir/resolve/testData/resolve/problems/javaAccessorConversion.kt"); @@ -1051,6 +1081,11 @@ public class FirDiagnosticsTestGenerated extends AbstractFirDiagnosticsTest { runTest("compiler/fir/resolve/testData/resolve/problems/nestedClassContructor.kt"); } + @TestMetadata("noBoundSmartcastAfterContinue.kt") + public void testNoBoundSmartcastAfterContinue() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/noBoundSmartcastAfterContinue.kt"); + } + @TestMetadata("propertyFromJavaPlusAssign.kt") public void testPropertyFromJavaPlusAssign() throws Exception { runTest("compiler/fir/resolve/testData/resolve/problems/propertyFromJavaPlusAssign.kt"); diff --git a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java index e2a2eba5938..cd21c577b1e 100644 --- a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java +++ b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithLightTreeTestGenerated.java @@ -1001,11 +1001,26 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/resolve/testData/resolve/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true); } + @TestMetadata("ambiguityOnExtensionFunctions.kt") + public void testAmbiguityOnExtensionFunctions() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/ambiguityOnExtensionFunctions.kt"); + } + @TestMetadata("asImports.kt") public void testAsImports() throws Exception { runTest("compiler/fir/resolve/testData/resolve/problems/asImports.kt"); } + @TestMetadata("bareTypes.kt") + public void testBareTypes() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/bareTypes.kt"); + } + + @TestMetadata("callableReferenceOnInstance.kt") + public void testCallableReferenceOnInstance() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/callableReferenceOnInstance.kt"); + } + @TestMetadata("covariantArrayAsReceiver.kt") public void testCovariantArrayAsReceiver() throws Exception { runTest("compiler/fir/resolve/testData/resolve/problems/covariantArrayAsReceiver.kt"); @@ -1021,11 +1036,26 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos runTest("compiler/fir/resolve/testData/resolve/problems/definitelyNotNullAmbiguity.kt"); } + @TestMetadata("exhaustiveWhenAndFlexibleType.kt") + public void testExhaustiveWhenAndFlexibleType() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/exhaustiveWhenAndFlexibleType.kt"); + } + + @TestMetadata("incorrectSuperCall.kt") + public void testIncorrectSuperCall() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/incorrectSuperCall.kt"); + } + @TestMetadata("invokeOfLambdaWithReceiver.kt") public void testInvokeOfLambdaWithReceiver() throws Exception { runTest("compiler/fir/resolve/testData/resolve/problems/invokeOfLambdaWithReceiver.kt"); } + @TestMetadata("iteratorOfVararg.kt") + public void testIteratorOfVararg() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/iteratorOfVararg.kt"); + } + @TestMetadata("javaAccessorConversion.kt") public void testJavaAccessorConversion() throws Exception { runTest("compiler/fir/resolve/testData/resolve/problems/javaAccessorConversion.kt"); @@ -1051,6 +1081,11 @@ public class FirDiagnosticsWithLightTreeTestGenerated extends AbstractFirDiagnos runTest("compiler/fir/resolve/testData/resolve/problems/nestedClassContructor.kt"); } + @TestMetadata("noBoundSmartcastAfterContinue.kt") + public void testNoBoundSmartcastAfterContinue() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/problems/noBoundSmartcastAfterContinue.kt"); + } + @TestMetadata("propertyFromJavaPlusAssign.kt") public void testPropertyFromJavaPlusAssign() throws Exception { runTest("compiler/fir/resolve/testData/resolve/problems/propertyFromJavaPlusAssign.kt"); diff --git a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithStdlibTestGenerated.java b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithStdlibTestGenerated.java index 682b3256c2b..bd907d281db 100644 --- a/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithStdlibTestGenerated.java +++ b/compiler/fir/resolve/tests/org/jetbrains/kotlin/fir/FirDiagnosticsWithStdlibTestGenerated.java @@ -587,6 +587,11 @@ public class FirDiagnosticsWithStdlibTestGenerated extends AbstractFirDiagnostic KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/fir/resolve/testData/resolve/stdlib/problems"), Pattern.compile("^([^.]+)\\.kt$"), null, true); } + @TestMetadata("arrayFilterCapturedType.kt") + public void testArrayFilterCapturedType() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/arrayFilterCapturedType.kt"); + } + @TestMetadata("classLiteralForParameter.kt") public void testClassLiteralForParameter() throws Exception { runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/classLiteralForParameter.kt"); @@ -597,6 +602,26 @@ public class FirDiagnosticsWithStdlibTestGenerated extends AbstractFirDiagnostic runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/cloneArray.kt"); } + @TestMetadata("delegateTypeMismatch.kt") + public void testDelegateTypeMismatch() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/delegateTypeMismatch.kt"); + } + + @TestMetadata("functionAndFunctionN.kt") + public void testFunctionAndFunctionN() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/functionAndFunctionN.kt"); + } + + @TestMetadata("inapplicableRemoveAll.kt") + public void testInapplicableRemoveAll() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/inapplicableRemoveAll.kt"); + } + + @TestMetadata("toSortedMapWithComparator.kt") + public void testToSortedMapWithComparator() throws Exception { + runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/toSortedMapWithComparator.kt"); + } + @TestMetadata("tryWithLambdaInside.kt") public void testTryWithLambdaInside() throws Exception { runTest("compiler/fir/resolve/testData/resolve/stdlib/problems/tryWithLambdaInside.kt");