diff --git a/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingOverloads.kt b/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingOverloads.kt index a5e75c40091..43bd1d7e656 100644 --- a/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingOverloads.kt +++ b/compiler/fir/analysis-tests/testData/resolve/diagnostics/conflictingOverloads.kt @@ -1,6 +1,6 @@ -fun test(x: Int) {} +fun test(x: Int) {} -fun test(y: Int) {} +fun test(y: Int) {} fun test() {} @@ -17,9 +17,9 @@ fun test(z: Int, c: Char) {} } class B : A { - override fun rest(s: String) {} + override fun rest(s: String) {} - fun rest(s: String) {} + fun rest(s: String) {} fun rest(l: Long) {} @@ -45,8 +45,8 @@ fun kek(t: T) {} fun lol(a: Array) {} fun lol(a: Array) {} -fun mem(t: T) where T : () -> Boolean, T : String {} -fun mem(t: T) where T : String, T : () -> Boolean {} +fun mem(t: T) where T : () -> Boolean, T : String {} +fun mem(t: T) where T : String, T : () -> Boolean {} class M { companion object {} diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/mixingImplicitAndExplicitReceivers.kt b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/mixingImplicitAndExplicitReceivers.kt index ca70aec69ce..4220436053e 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/mixingImplicitAndExplicitReceivers.kt +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/receivers/mixingImplicitAndExplicitReceivers.kt @@ -1,4 +1,4 @@ -fun takeString(s: String) {} +fun takeString(s: String) {} class Wrapper(val s: String?) { fun withThis() { @@ -11,4 +11,4 @@ class Wrapper(val s: String?) { } } -fun takeString(s: String) {} +fun takeString(s: String) {} diff --git a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.kt b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.kt index 2ab10f63a19..c48cdff0f54 100644 --- a/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.kt +++ b/compiler/fir/analysis-tests/testData/resolve/smartcasts/safeCalls/assignSafeCall.kt @@ -23,7 +23,7 @@ fun test_2(a: A?) { } } -fun test_3(x: Any?) { +fun test_3(x: Any?) { val a = x as? A ?: return a.foo() // Should be OK x.foo() // Should be OK @@ -53,7 +53,7 @@ fun test_2(a: B?) { } } -fun test_3(x: Any?) { +fun test_3(x: Any?) { val a = x as? B ?: return a.foo() // Should be OK x.foo() // Should be OK diff --git a/compiler/fir/analysis-tests/testData/resolve/whenElse.kt b/compiler/fir/analysis-tests/testData/resolve/whenElse.kt index d217e230760..e3340f5c092 100644 --- a/compiler/fir/analysis-tests/testData/resolve/whenElse.kt +++ b/compiler/fir/analysis-tests/testData/resolve/whenElse.kt @@ -13,7 +13,7 @@ class B() class C(val b : B) fun get(f: Boolean) = if (f) {A.A1} else {""} -fun case2() { +fun case2() { val flag: Any = get(false) //string val l1 = when (flag!!) { // should be NO_ELSE_IN_WHEN @@ -27,7 +27,7 @@ fun get(f: Boolean) = if (f) {A.A1} else {""} } } -fun case2() { +fun case2() { val flag: Any = get(true) //A val l1 = when (flag!!) {// should be NO_ELSE_IN_WHEN diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/beyoundCalls.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/beyoundCalls.kt index 51dd56f6405..93336ccf18e 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/beyoundCalls.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/callableReferences/beyoundCalls.kt @@ -1,5 +1,5 @@ -fun bar(x: String): Int = 1 -fun bar(x: String): Double = 1 +fun bar(x: String): Int = 1 +fun bar(x: String): Double = 1 fun baz(x: String): Int = 1 fun foobaz(x: T): R = TODO() diff --git a/compiler/fir/analysis-tests/testData/resolveWithStdlib/lowPriorityInResolution.kt b/compiler/fir/analysis-tests/testData/resolveWithStdlib/lowPriorityInResolution.kt index dfbc77b8778..bfda7fa1285 100644 --- a/compiler/fir/analysis-tests/testData/resolveWithStdlib/lowPriorityInResolution.kt +++ b/compiler/fir/analysis-tests/testData/resolveWithStdlib/lowPriorityInResolution.kt @@ -1,8 +1,8 @@ -@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") +@Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @kotlin.internal.LowPriorityInOverloadResolution -fun foo(): Int = 1 +fun foo(): Int = 1 -fun foo(): String = "" +fun foo(): String = "" fun test() { val s = foo() diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt index dd95a824702..9b15b3505e6 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/FirErrors.kt @@ -139,7 +139,7 @@ object FirErrors { // Redeclarations val MANY_COMPANION_OBJECTS by error0() - val CONFLICTING_OVERLOADS by error1() + val CONFLICTING_OVERLOADS by error1(SourceElementPositioningStrategies.DECLARATION_SIGNATURE_OR_DEFAULT) val REDECLARATION by error1() val ANY_METHOD_IMPLEMENTED_IN_INTERFACE by error0() diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/LightTreePositioningStrategies.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/LightTreePositioningStrategies.kt index 78863350667..f0a296ea3ea 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/LightTreePositioningStrategies.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/LightTreePositioningStrategies.kt @@ -145,6 +145,30 @@ object LightTreePositioningStrategies { } } + val DECLARATION_SIGNATURE_OR_DEFAULT: LightTreePositioningStrategy = object : LightTreePositioningStrategy() { + override fun mark(node: LighterASTNode, tree: FlyweightCapableTreeStructure): List = + if (node.isDeclaration) { + DECLARATION_SIGNATURE.mark(node, tree) + } else { + DEFAULT.mark(node, tree) + } + + private val LighterASTNode.isDeclaration: Boolean + get() = + when (tokenType) { + KtNodeTypes.PRIMARY_CONSTRUCTOR, KtNodeTypes.SECONDARY_CONSTRUCTOR, + KtNodeTypes.FUN, KtNodeTypes.FUNCTION_LITERAL, + KtNodeTypes.PROPERTY, + KtNodeTypes.PROPERTY_ACCESSOR, + KtNodeTypes.CLASS, + KtNodeTypes.OBJECT_DECLARATION, + KtNodeTypes.CLASS_INITIALIZER -> + true + else -> + false + } + } + private class ModifierSetBasedLightTreePositioningStrategy(private val modifierSet: TokenSet) : LightTreePositioningStrategy() { override fun mark(node: LighterASTNode, tree: FlyweightCapableTreeStructure): List { tree.findChildByType(node, modifierSet)?.let { return markElement(it, tree) } diff --git a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/SourceElementPositioningStrategies.kt b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/SourceElementPositioningStrategies.kt index f5eb8792cea..97d1c6e463e 100644 --- a/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/SourceElementPositioningStrategies.kt +++ b/compiler/fir/checkers/src/org/jetbrains/kotlin/fir/analysis/diagnostics/SourceElementPositioningStrategies.kt @@ -33,6 +33,11 @@ object SourceElementPositioningStrategies { PositioningStrategies.DECLARATION_SIGNATURE ) + val DECLARATION_SIGNATURE_OR_DEFAULT = SourceElementPositioningStrategy( + LightTreePositioningStrategies.DECLARATION_SIGNATURE_OR_DEFAULT, + PositioningStrategies.DECLARATION_SIGNATURE_OR_DEFAULT + ) + val VISIBILITY_MODIFIER = SourceElementPositioningStrategy( LightTreePositioningStrategies.VISIBILITY_MODIFIER, PositioningStrategies.VISIBILITY_MODIFIER diff --git a/compiler/testData/diagnostics/tests/dataClasses/conflictingCopyOverloads.fir.kt b/compiler/testData/diagnostics/tests/dataClasses/conflictingCopyOverloads.fir.kt index 5eccbe99833..6433094e08a 100644 --- a/compiler/testData/diagnostics/tests/dataClasses/conflictingCopyOverloads.fir.kt +++ b/compiler/testData/diagnostics/tests/dataClasses/conflictingCopyOverloads.fir.kt @@ -1,6 +1,6 @@ // !DIAGNOSTICS: -UNUSED_PARAMETER data class A(val x: Int, val y: String) { - fun copy(x: Int, y: String) = x - fun copy(x: Int, y: String) = A(x, y) + fun copy(x: Int, y: String) = x + fun copy(x: Int, y: String) = A(x, y) } \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.fir.kt index 321146b1b63..e311960423f 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.fir.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/MultiDeclarationErrors.fir.kt @@ -7,8 +7,8 @@ class MyClass { class MyClass2 {} -fun MyClass2.component1() = 1.2 -fun MyClass2.component1() = 1.3 +fun MyClass2.component1() = 1.2 +fun MyClass2.component1() = 1.3 fun test(mc1: MyClass, mc2: MyClass2) { val (a, b) = mc1 diff --git a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.fir.kt b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.fir.kt index 11046074966..e845fef30e1 100644 --- a/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.fir.kt +++ b/compiler/testData/diagnostics/tests/declarationChecks/destructuringDeclarations/ForLoopComponentFunctionAmbiguity.fir.kt @@ -1,6 +1,6 @@ class A { - operator fun component1() = 1 - operator fun component1() = 1 + operator fun component1() = 1 + operator fun component1() = 1 operator fun component2() = 1 } diff --git a/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingImplDeclarations.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingImplDeclarations.fir.kt index 3fc939f994e..f7be9406549 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingImplDeclarations.fir.kt +++ b/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/conflictingImplDeclarations.fir.kt @@ -7,11 +7,11 @@ expect fun foo() // MODULE: m2-jvm(m1-common) // FILE: jvm.kt -actual fun foo() {} -actual fun foo() {} +actual fun foo() {} +actual fun foo() {} // MODULE: m3-js(m1-common) // FILE: js.kt -actual fun foo() {} -actual fun foo() {} +actual fun foo() {} +actual fun foo() {} diff --git a/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerDeclarationWithBody.fir.kt b/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerDeclarationWithBody.fir.kt index 354cb79554c..b7917046dff 100644 --- a/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerDeclarationWithBody.fir.kt +++ b/compiler/testData/diagnostics/tests/multiplatform/topLevelFun/headerDeclarationWithBody.fir.kt @@ -4,6 +4,6 @@ expect fun foo() -expect fun foo() {} +expect fun foo() {} expect fun bar() {} diff --git a/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInClass.fir.kt b/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInClass.fir.kt index 7ab306aa4ba..753ddd6221b 100644 --- a/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInClass.fir.kt +++ b/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInClass.fir.kt @@ -1,6 +1,6 @@ class A { - fun a(a: Int): Int = 0 + fun a(a: Int): Int = 0 - fun a(a: Int) { - } + fun a(a: Int) { + } } diff --git a/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInPackage.fir.kt b/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInPackage.fir.kt index ccecc8e1f00..e785dc5bebb 100644 --- a/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInPackage.fir.kt +++ b/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsFunsDifferentReturnInPackage.fir.kt @@ -1,7 +1,7 @@ package qwertyuiop -fun c(s: String) { -} +fun c(s: String) { +} -fun c(s: String) { -} +fun c(s: String) { +} diff --git a/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalExtFunsInPackage.fir.kt b/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalExtFunsInPackage.fir.kt index a7fa2b5bc69..aaee8c77bfe 100644 --- a/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalExtFunsInPackage.fir.kt +++ b/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalExtFunsInPackage.fir.kt @@ -1,5 +1,5 @@ package extensionFunctions -fun Int.qwe(a: Float) = 1 +fun Int.qwe(a: Float) = 1 -fun Int.qwe(a: Float) = 2 +fun Int.qwe(a: Float) = 2 diff --git a/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsInClass.fir.kt b/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsInClass.fir.kt deleted file mode 100644 index 756a107d8fd..00000000000 --- a/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsInClass.fir.kt +++ /dev/null @@ -1,7 +0,0 @@ -class A() { - fun b() { - } - - fun b() { - } -} diff --git a/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsInClass.kt b/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsInClass.kt index a0f0a29a765..5603c19cc0f 100644 --- a/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsInClass.kt +++ b/compiler/testData/diagnostics/tests/overload/ConflictingOverloadsIdenticalFunsInClass.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL class A() { fun b() { } diff --git a/compiler/testData/diagnostics/tests/overload/TypeParameterMultipleBounds.fir.kt b/compiler/testData/diagnostics/tests/overload/TypeParameterMultipleBounds.fir.kt deleted file mode 100644 index 1aef2b3ca48..00000000000 --- a/compiler/testData/diagnostics/tests/overload/TypeParameterMultipleBounds.fir.kt +++ /dev/null @@ -1,15 +0,0 @@ -import java.io.Serializable - -interface Test1 { - fun foo(t: T) where T : Cloneable, T : Serializable - fun foo(t: T) where T : Serializable, T : Cloneable -} - - -interface I1 -interface I2 : I1 - -interface Test2 { - fun foo(t: T) where T : I1, T : I2 - fun foo(t: T) where T : I2, T : I1 -} diff --git a/compiler/testData/diagnostics/tests/overload/TypeParameterMultipleBounds.kt b/compiler/testData/diagnostics/tests/overload/TypeParameterMultipleBounds.kt index e6e1d985c79..a6498f1027e 100644 --- a/compiler/testData/diagnostics/tests/overload/TypeParameterMultipleBounds.kt +++ b/compiler/testData/diagnostics/tests/overload/TypeParameterMultipleBounds.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL import java.io.Serializable interface Test1 { diff --git a/compiler/testData/diagnostics/tests/override/DuplicateMethod.fir.kt b/compiler/testData/diagnostics/tests/override/DuplicateMethod.fir.kt deleted file mode 100644 index be33444fcb7..00000000000 --- a/compiler/testData/diagnostics/tests/override/DuplicateMethod.fir.kt +++ /dev/null @@ -1,8 +0,0 @@ -interface Some { - fun test() -} - -class SomeImpl : Some { - override fun test() {} - override fun test() {} -} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/override/DuplicateMethod.kt b/compiler/testData/diagnostics/tests/override/DuplicateMethod.kt index 15a21f53ec4..8b6649cd6e6 100644 --- a/compiler/testData/diagnostics/tests/override/DuplicateMethod.kt +++ b/compiler/testData/diagnostics/tests/override/DuplicateMethod.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL interface Some { fun test() } diff --git a/compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInFile.fir.kt b/compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInFile.fir.kt deleted file mode 100644 index fa478cd835d..00000000000 --- a/compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInFile.fir.kt +++ /dev/null @@ -1,5 +0,0 @@ -// !DIAGNOSTICS: -UNUSED_PARAMETER -// KT-9733 No error shown for 2 "main" functions in the same file - -fun main(args: Array) {} -fun main(args: Array) {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInFile.kt b/compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInFile.kt index 648c51dc73c..3de04fac6c1 100644 --- a/compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInFile.kt +++ b/compiler/testData/diagnostics/tests/redeclarations/RedeclarationMainInFile.kt @@ -1,3 +1,4 @@ +// FIR_IDENTICAL // !DIAGNOSTICS: -UNUSED_PARAMETER // KT-9733 No error shown for 2 "main" functions in the same file diff --git a/compiler/testData/diagnostics/tests/redeclarations/RedeclaringPrivateToFile.fir.kt b/compiler/testData/diagnostics/tests/redeclarations/RedeclaringPrivateToFile.fir.kt index faa8c989be2..0d4d6ac0d36 100644 --- a/compiler/testData/diagnostics/tests/redeclarations/RedeclaringPrivateToFile.fir.kt +++ b/compiler/testData/diagnostics/tests/redeclarations/RedeclaringPrivateToFile.fir.kt @@ -14,16 +14,16 @@ private val invalidProp0 = 1 fun useInvalidFun0() = invalidFun0() fun useInvalidProp0() = invalidProp0 -private fun invalidFun1() {} -private fun invalidFun1() {} +private fun invalidFun1() {} +private fun invalidFun1() {} -private fun invalidFun2() {} -public fun invalidFun2() {} +private fun invalidFun2() {} +public fun invalidFun2() {} public fun invalidFun3() {} -private fun invalidFun4() {} -public fun invalidFun4() {} +private fun invalidFun4() {} +public fun invalidFun4() {} public fun validFun2(a: A) = a public fun validFun2(b: B) = b diff --git a/compiler/testData/diagnostics/tests/redeclarations/kt470.fir.kt b/compiler/testData/diagnostics/tests/redeclarations/kt470.fir.kt index d5c756feafe..b8732450a9e 100644 --- a/compiler/testData/diagnostics/tests/redeclarations/kt470.fir.kt +++ b/compiler/testData/diagnostics/tests/redeclarations/kt470.fir.kt @@ -7,14 +7,14 @@ val b : Int = 1 val b : Int = 1 -fun foo() {} // and here too -fun foo() {} // and here -fun foo() {} // and here -fun foo() {} // and here +fun foo() {} // and here too +fun foo() {} // and here +fun foo() {} // and here +fun foo() {} // and here -fun bar() {} // and here -fun bar() {} // and here -fun bar() {} // and here +fun bar() {} // and here +fun bar() {} // and here +fun bar() {} // and here class A { val a : Int = 1 @@ -26,12 +26,12 @@ class A { val b : Int = 1 val b : Int = 1 - fun foo() {} // and here too - fun foo() {} // and here - fun foo() {} // and here - fun foo() {} // and here + fun foo() {} // and here too + fun foo() {} // and here + fun foo() {} // and here + fun foo() {} // and here - fun bar() {} // and here - fun bar() {} // and here - fun bar() {} // and here + fun bar() {} // and here + fun bar() {} // and here + fun bar() {} // and here } diff --git a/compiler/testData/diagnostics/tests/resolve/resolveWithRedeclarationError.fir.kt b/compiler/testData/diagnostics/tests/resolve/resolveWithRedeclarationError.fir.kt index e19700c8231..342ef2b152c 100644 --- a/compiler/testData/diagnostics/tests/resolve/resolveWithRedeclarationError.fir.kt +++ b/compiler/testData/diagnostics/tests/resolve/resolveWithRedeclarationError.fir.kt @@ -3,32 +3,32 @@ package c fun z(view: () -> Unit) {} -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } -fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } +fun x() = z { z { z { z { z { z { z { z { } } } } } } } } class x() {} \ No newline at end of file diff --git a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendConflictsWithNoSuspend.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendConflictsWithNoSuspend.fir.kt index 93b532a59ec..05c30d2900e 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendConflictsWithNoSuspend.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/coroutines/suspendConflictsWithNoSuspend.fir.kt @@ -5,11 +5,11 @@ interface A { } interface B : A { - suspend override fun foo() { + suspend override fun foo() { - } + } - override fun foo() { + override fun foo() { - } + } } diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAndLowPriority.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAndLowPriority.fir.kt index acb58ed66d0..e7b0720908d 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAndLowPriority.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/noInferAndLowPriority.fir.kt @@ -4,10 +4,10 @@ @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @kotlin.jvm.JvmName("containsAny") @kotlin.internal.LowPriorityInOverloadResolution -public fun Iterable.contains1(element: T): Int = null!! +public fun Iterable.contains1(element: T): Int = null!! @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -public fun Iterable.contains1(element: @kotlin.internal.NoInfer T): Boolean = null!! +public fun Iterable.contains1(element: @kotlin.internal.NoInfer T): Boolean = null!! fun test() { diff --git a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndLowPriority.fir.kt b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndLowPriority.fir.kt index 68afa34a75e..e3f188fd452 100644 --- a/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndLowPriority.fir.kt +++ b/compiler/testData/diagnostics/testsWithStdLib/inference/annotationsForResolve/onlyInputTypesAndLowPriority.fir.kt @@ -5,10 +5,10 @@ @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @kotlin.jvm.JvmName("containsAny") @kotlin.internal.LowPriorityInOverloadResolution -public fun Iterable.contains1(element: T): Int = null!! +public fun Iterable.contains1(element: T): Int = null!! @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") -public fun <@kotlin.internal.OnlyInputTypes T> Iterable.contains1(element: T): Boolean = null!! +public fun <@kotlin.internal.OnlyInputTypes T> Iterable.contains1(element: T): Boolean = null!! @Suppress("INVISIBLE_MEMBER", "INVISIBLE_REFERENCE") @JvmName("getAny")