// WITH_STDLIB // FIR_IDENTICAL // RENDER_ALL_DIAGNOSTICS_FULL_TEXT // MODULE: lib package com.example.klib.serialization.diagnostics fun movedToLib() {} // MODULE: main(lib) // FILE: foo.kt package com.example.klib.serialization.diagnostics private fun privateFunSeparateFiles() = Unit @Deprecated("", level = DeprecationLevel.HIDDEN) fun foo(): Long = 0L @Deprecated("", level = DeprecationLevel.HIDDEN) fun T.topLevelParametrized(s: K): T = TODO() @Deprecated("", level = DeprecationLevel.HIDDEN) internal fun topLevelInternalVararg(vararg i: Int) = 0 typealias S = Map @Deprecated("", level = DeprecationLevel.HIDDEN) fun S.typealiasReciever() = 0 // FILE: main.kt package com.example.klib.serialization.diagnostics private fun privateFunSeparateFiles() = Unit @Deprecated("", level = DeprecationLevel.HIDDEN) fun foo(): String = "" fun foo(): Int = 0 @Deprecated("This function moved to the 'lib' module", level = DeprecationLevel.HIDDEN) fun movedToLib() {} class A { @Deprecated(message = "", level = DeprecationLevel.HIDDEN) fun parameterized(a: T): T = a fun parameterized(a: T) {} @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun privateMethod(): Int = 0 private fun privateMethod(): Long = 0L } @Deprecated(message = "", level = DeprecationLevel.HIDDEN) private fun privateTopLevelFunction(): Int = 0 private fun privateTopLevelFunction(): Long = 0L fun main() { foo() movedToLib() // Test that the diagnostic is reported for declarations that are referenced before they are declared bar() } @Deprecated("", level = DeprecationLevel.HIDDEN) fun bar(): Long = 0L fun bar(): Long = 1L @Deprecated("", level = DeprecationLevel.HIDDEN) fun T.topLevelParametrized(s: K): T = TODO() @Deprecated("", level = DeprecationLevel.HIDDEN) internal fun topLevelInternalVararg(vararg i: Int) = 0 @Deprecated("", level = DeprecationLevel.HIDDEN) fun Map.typealiasReciever() = 0