diff --git a/compiler/testData/diagnostics/tests/java8Overrides/kt45508.kt b/compiler/testData/diagnostics/tests/java8Overrides/kt45508.kt index 74799931c57..73f3b2498f0 100644 --- a/compiler/testData/diagnostics/tests/java8Overrides/kt45508.kt +++ b/compiler/testData/diagnostics/tests/java8Overrides/kt45508.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL interface A { fun foo(): Any } diff --git a/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.fir.kt b/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.fir.kt new file mode 100644 index 00000000000..ad38c5b85db --- /dev/null +++ b/compiler/testData/diagnostics/tests/typealias/boundsViolationInDeepTypeAliasExpansion.fir.kt @@ -0,0 +1,16 @@ +// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER + +class TColl> + +typealias TC = TColl +typealias TC2 = TC + +fun test1(x: TC2>) {} +fun test2(x: TC2>) {} +fun test3(x: TC2>) {} +fun test4(x: TC2>) {} + +val test5 = TC2>() +val test6 = TC2>() +val test7 = TC2>() +val test8 = TC2List>() diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.kt index cfa77186243..6b7dd9b2aad 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/notNullAnnotation.kt @@ -22,5 +22,5 @@ interface TypePredicate : (KotlinType) -> Boolean { fun TypePredicate.expectedTypeFor(keys: Iterable): Map = keys.fold(SmartFMap.emptyMap()) { map, key -> - map.plus(key, this) + map.plus(key, this) } diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.10.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.10.fir.kt index 55a95cd8b2b..181f150f6eb 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.10.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/neg/2.10.fir.kt @@ -9,17 +9,17 @@ package testPackCase1 fun case1(a: A, c: C) { - a?.b += c - a?.b .plusAssign(c) + a?.b += c + a?.b .plusAssign(c) val x = { - a?.b += c - a?.b.plusAssign(c) + a?.b += c + a?.b.plusAssign(c) }() - a?.b += { c }() + a?.b += { c }() - a?.b.plusAssign({ c }()) + a?.b.plusAssign({ c }()) } class A(val b: B) diff --git a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.fir.kt b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.fir.kt index bd3f6d01ddc..3e8f4d6af9d 100644 --- a/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.fir.kt +++ b/compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.fir.kt @@ -21,15 +21,15 @@ package testPackCase2 fun case2(a: A?, c: C) { - a?.b += c + a?.b += c a?.b.plusAssign(c) val x = { - a?.b += c + a?.b += c a?.b.plusAssign(c) }() - a?.b += { c }() + a?.b += { c }() a?.b.plusAssign({ c }()) @@ -60,15 +60,15 @@ package testPackCase3 fun case3(a: A?, c: C) { - a?.b += c + a?.b += c a?.b.plusAssign(c) val x = { - a?.b += c + a?.b += c a?.b.plusAssign(c) }() - a?.b += { c }() + a?.b += { c }() a?.b.plusAssign({ c }()) diff --git a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/FirIdeSpecTest.java b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/FirIdeSpecTest.java index a834980a9b4..a088db66c7e 100644 --- a/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/FirIdeSpecTest.java +++ b/idea/idea-frontend-fir/idea-fir-low-level-api/tests/org/jetbrains/kotlin/idea/fir/low/level/api/diagnostic/compiler/based/FirIdeSpecTest.java @@ -4061,6 +4061,12 @@ public class FirIdeSpecTest extends AbstractDiagnosisCompilerTestDataSpecTest { runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.1.kt"); } + @Test + @TestMetadata("2.2.kt") + public void test2_2() throws Exception { + runTest("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos/2.2.kt"); + } + @Test public void testAllFilesPresentInPos() throws Exception { KtTestUtil.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("compiler/tests-spec/testData/diagnostics/linked/overload-resolution/building-the-overload-candidate-set-ocs/operator-call/p-1/pos"), Pattern.compile("^(.+)\\.kt$"), Pattern.compile("^(.+)\\.fir\\.kts?$"), true);