Library methods such as 'listOf' are resolved
to have the package fragments as their parents,
but JVM expects their containing file classes as parents.
This fix generates those file classes and
uses them as parent replacements for such library methods.
* TailCallOptimizationLowering should go into local classes in order to
transform their suspend methods;
* the check for invokes of noinline lambda arguments in codegen was
incorrect, as it also returned true for calls of lambdas stored in
local variables;
* IrInlineCodegen should mark non-inlinable arguments used as inline
suspend parameters;
* detection of suspend/inline call sites was incorrect (or maybe it's
the `compilationContextDescriptor` that was incorrect?..)
The `compileOnly` configuration of a source set was not included in the
granular dependency transformation, which led to the dependencies from
the configuration being excluded as unrequested during dependency
processing.
Fix this by properly including the compileOnly scope into the
dependencies transformation.
Issue #KT-36469 Fixed
In some setups, the friendArtifacts that we had in addition to direct
associate compilations' output classes were insufficient. For example:
1. When an Android module's tests depend on another module which
transitively depends on the module containing tests: then the AGP
API doesn't tell us that there are artifacts from the tested
variant, but instead there's just the module's artifact.
2. Similar case but without Android, and if the classes are read from
the module's artifact rather than the production output classes dir,
then they are definitely not on the friend paths (which include the
production classes dirs and not the the production artifact).
In both cases, the friendArtifacts mechanism allows us to add those
potential sources of the friend classes to the friend paths.
Issue #KT-35942 Fixed
- Now inspection does not rely on synthetic descriptors at all, instead
it uses `SamConversionOracle` and `SamConversionResolver` to detect
if the argument type support SAM conversion
- This transparently considers all language features like
`SAM conversions for kotlin functions`, `Functional interfaces` etc.
- In case of multiple SAM arguments, part of them can be converted only
when `SAM conversion per argument` is enabled
- Fix inspection and nj2k tests that were failing because of better
working inspection
- Rewrite automatically fixes multiple bugs that were present
- ^KT-36367 ^KT-36368 ^KT-36296 ^KT-36395 Fixed