Set correct IR origins for inc/dec operations

NB: in order to produce correct IR origins, the source element kinds for
some FIR elements has been changed. As a side effect, mapping PSI to FIR
slightly changed: namely, for `a[b]++`, `a[b]` used to be mapped on
`set` call or callable reference, but now it is mapped on `get` call.

^KT-61891: Fixed
^KT-64387: Fixed
This commit is contained in:
vladislav.grechko
2023-12-28 17:12:17 +01:00
committed by Space Team
parent 8b1d87848d
commit 9aa8fb80e7
65 changed files with 463 additions and 972 deletions
@@ -162,7 +162,7 @@ class ErrorNodeDiagnosticCollectorComponent(
}
// Prefix inc/dec on array access will have two calls to .get(...), don't report for the second one.
if (source?.kind == KtFakeSourceElementKind.DesugaredPrefixSecondGetReference) {
if (source?.kind is KtFakeSourceElementKind.DesugaredPrefixSecondGetReference) {
return
}