Add @Deprecated annotation to a synthetic $serializer class

in K2 so it matches K1 behavior.

Deprecation is required, so the declaration will not be visible to user in completion in the IDE.

#KT-65757 Fixed
This commit is contained in:
Leonid Startsev
2024-03-13 16:03:38 +01:00
committed by Space Team
parent 0df3a37303
commit dbb7ab1760
16 changed files with 86 additions and 29 deletions
@@ -0,0 +1,14 @@
// FIR_IDENTICAL
// WITH_STDLIB
// SKIP_TXT
import kotlinx.serialization.*
@Serializable
class A
fun foo() {
A.<!DEPRECATION_ERROR!>`$serializer`<!>
A.<!DEPRECATION_ERROR!>`$serializer`<!>.descriptor
A(<!TOO_MANY_ARGUMENTS!>0<!>, <!TOO_MANY_ARGUMENTS!>null<!>)
}