Files
kotlin-fork/analysis
Andrei Klunnyi 66a74ab60e KT-56941 Gradle KTS navigation: go to declaration (Java) doesn't work
Case:
```
options.incrementalAfterFailure = false    // assignment operator  (a)
options.incrementalAfterFailure.set(false) // equivalent (without) (b)

// (a) works thanks to AssignResolutionAltererExtension
// 'incrementalAfterFailure' is a synthetic Java property
// i.e. getIncrementalAfterFailure()

// Navigation to 'incrementalAfterFailure' (a) doesn't work.
```

By navigation, we mean opening declaration sources. The reason of the
issue lied in sources absence (inability to find them).

In general, sources are available via declaration descriptor.
To find one for a property, one needs to understand expression
kind: read/write/both. Hence, the choice of a getter/setter/both.
Since `=` operator is interpreted as a write type expression, a setter
was searched. Missing one resulted in corrupted navigation.

As a fix we provide getter for the missing setter case.

^KT-56941 fixed
2023-03-01 13:25:38 +00:00
..