From now on we load script configurations for embedded Kotlin code
snippets. Potentially this might lead to an extra load during a file
analysis.
IDEA side test for the change is here:
`HighlightingTestGenerated.Uncategorized#testKotlinInJavaInjection`
^KT-56632 fixed
A::foo is preferably resolved as an unbound reference to A.foo, however
if A.Companion is a subtype of A and the expected type has one fewer
parameter than the type of the unbound reference, generate a bound
reference with the companion as receiver.
^KT-56519 Fixed
`supportsEnumEntries` in `EnumCLassLowering` is not really
needed, but it was left just in case.
Both K1 and K2 ensure the feature is
enabled before they generate IR.
`supportsEnumEntries` is not enough, because the frontend will not
generate `entries` if `kotlin.enums.EnumEntries` is not available
(linking against an outdated stdlib is considered a valid use-case).
From the resolution point of view,
it's OK to resolve into `entries` while
the feature is off, because then K1 reports an error on the call site.
^KT-56687 Fixed
^KT-55614 Fixed
This change allows to revert adding `WITH_STDLIB` directive
to tests which happened at `a9343aeb`.
Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com>
The expression needs to be resolved first to determine if there is a
receiver that needs to be extracted to a temporary variable. Also, the
special case for prefix increment/decrement on local variable without
delegates requires resolution to check if the variable is local.
^KT-56771 Fixed
^KT-56659 Fixed
tryRenderStructOrUnion can return null for a struct or union to indicate
that passing it by value to or from C is not supported (e.g. it has
bitfields).
It incorrectly handled the case when passing a nested struct or union by
value was unsupported -- instead of null, it returned incorrect struct
declaration.
As a result, when passing such a complex struct or union by value to or
from C, the backend generated C stubs with syntax errors, which resulted
into obscure compilation error ("unable to compile C bridge").
This commit fixes this case in tryRenderStructOrUnion function, and thus
makes the compilation error message more understandable.
^KT-55030
Those scopes always contain all nested classifiers,
while only some of them are available without
explicit import. There are other, more reliable
scopes (like FirNestedClassifierScopeWithSubstitution)
which are stricter about which classifiers
they recognise as valid
^KTIJ-24684 Fixed
^KTIJ-24662 Fixed
It's not possible to unmute some tests for K2 because it causes testData structure changing
If change testData, NATIVE doesn't work even with `IGNORE_BACKEND`