We shouldn't process other elements (like parameters/receivers) because
we can't modify them anyway. This will help to avoid exceptions like
```
Attempt to load text for binary file which doesn't have a decompiler plugged in
```
in tests
^KT-61431
This project was replaced by the :native:kotlin-native-utils located at
native/utils. All sources were already merged.
Merge-request: KT-MR-11847
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
Otherwise, it will throw exception like:
```
IllegalStateException: No 'FirJvmTypeMapper'
```
Anyway, PsiType is JVM conception, so it is not supposed to be used
outside the JVM platform
^KT-60318
Reporting it for `VIRTUAL_MEMBER_HIDDEN`
is ok, because `VIRTUAL_MEMBER_HIDDEN`
has always been an error, so we are
allowed to treat these as overrides
implicitly.
^KT-59408 Fixed
^KT-59419 Fixed
^KT-57076 Fixed
Originally it was named createModuleFragmentWithSignaturesIfNeeded, because
there was a counterpart `...WithoutSignatures`. Now that function has
gone and there is only one entrypoint left
If some function is not fake-override, then its type should be just
default type of containing class
For fake overrides the default type calculated in the following way:
1. Find first overridden function, which is not fake override
2. Take its containing class
3. Find supertype of current containing class with type constructor of
class from step 2
^KT-60252 Fixed
Previously it handled `FirResolvedNamedReference` and `FirThisReceiverReference`,
but the second one effectively was never passed to this function. It
happened because `FirThisReceiverReference` is present only in `FirThisReceiverExpression`,
which is processed separately in `Fir2IrVisitor.visitThisReceiverExpression`,
and its implementation don't call `toSymbolForCall`
This change uncovered the following problem in pipeline: we have a contract,
that all bodies will be generated after all fake overrides will be preprocessed.
But DataClassMembersGenerator generates bodies before f/o creation,
which leads to the problem, if data class has forward reference to some
class which was not processed before (because in this case generator
of `hashCode` function will try to reference f/o, which is not created yet,
which leads to `SymbolAlreadyBound` problem)
```
data class Some(val a: A) {
generated fun hashCode(): Int {
return a.hashCode() // (1) is not generated yet
}
}
class A {
fake-override fun hashCode(): Int // (1)
}
```
This problem will be fixed in the next commit
(related test is compiler/testData/codegen/box/ir/kt52677.kt)
^KT-60924