In 1.7.20 we used the nearest Java-based receiver for such field
references in backend. Now we are using use-site receiver again,
it can lead to accidental usage of derived class property backing field.
This is effectively a revert of KT-49507 fix, see commits:
- fa914f20
- b0a6508d
#KT-54393 Fixed
#KT-49507 Planned
#KT-52338 Planned
For FE 1.0, we just change super qualifier symbol to
base class, if it's possible.
For FIR, we introduce using of super qualifier symbols for
field accesses and repeat FE 1.0 behavior here.
#KT-49507 Fixed
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
Currently FirThisReceiverExpression of instance methods are translated
to references of the class' thisReceiver,
not the method's dispatch receiver,
which causes problems with IrFrameMap::typeOf,
as the class' thisReceiver is not in the typeMap.
This commit translates non-qualified "this" references of
instance methods to references of the methods' dispatch receiver.
Prefer to rename fields from the class, not from the companion, to be
more in line with the old backend's behavior. This has no effect on the
behavior of current tests but removes differences in metadata (since
metadata has information about every property->field mapping) in some of
them
This is needed to get rid of the code that appends "$companion" to
properties moved from companion, because it caused inconsistencies in
the ABI and in JVM signatures stored in the metadata