K1: Report deprecation on synthetic properties for NOT_CONSIDERED JDK members

Currently, for other synthetic properties, deprecation from the original
method is already being propagated to the relevant new synthetic
property accessor.

But what we need is also reporting warnings on synthetic properties
accessors call-sites if original methods are considered deprecated
as a result of deprecation propagation.

KT-60659 Fixed
^KT-60769 Fixed
This commit is contained in:
Denis.Zharkov
2023-07-28 19:56:10 +02:00
committed by Space Team
parent eae97e4f76
commit 0694ee50a3
11 changed files with 252 additions and 27 deletions
@@ -4,10 +4,10 @@ fun foo(ll: java.util.LinkedList<String>, al: ArrayList<String>, ad: ArrayDeque<
ll.addFirst("")
ll.addLast("")
ll.<!DEPRECATION!>getFirst<!>()
ll.first // synthetic property for getFirst()
ll.<!DEPRECATION!>first<!> // synthetic property for getFirst()
ll.first() // stdlib extension on List
ll.<!DEPRECATION!>getLast<!>()
ll.last
ll.<!DEPRECATION!>last<!>
ll.last()
ll.<!DEBUG_INFO_CALL("fqName: java.util.LinkedList.removeFirst; typeCall: function")!>removeFirst()<!>
ll.<!DEBUG_INFO_CALL("fqName: java.util.LinkedList.removeLast; typeCall: function")!>removeLast()<!>
@@ -16,10 +16,10 @@ fun foo(ll: java.util.LinkedList<String>, al: ArrayList<String>, ad: ArrayDeque<
al.addFirst("")
al.addLast("")
al.<!DEPRECATION!>getFirst<!>()
al.first
al.<!DEPRECATION!>first<!>
al.first()
al.<!DEPRECATION!>getLast<!>()
al.last
al.<!DEPRECATION!>last<!>
al.last()
al.<!DEBUG_INFO_CALL("fqName: java.util.ArrayList.removeFirst; typeCall: function")!>removeFirst()<!>
al.<!DEBUG_INFO_CALL("fqName: java.util.ArrayList.removeLast; typeCall: function")!>removeLast()<!>