There are two different objectives associated with this newly
introduced extras:
- originClassId: Used to track where a type came from; Will
ensure that the translation queue will be populated to also
translate potential dependency classes
- requiresForwardDeclaration: Used to track if a certain
type requires rendering as forward declaration
KT-65891
It should have been already implemented as intrinsic in all backends.
Do not test enumEntries intrinsic in the old JVM BE.
KT-53154
Co-authored-by: Alexander Udalov <alexander.udalov@jetbrains.com>
The declarations that are printed by the kotlinp tool may be optionally
sorted. That's controlled by `sortDeclarations` flag in
`org.jetbrains.kotlin.kotlinp.Settings`. However, there was no sorting
implemented for `KmClass`es.
This commit fixes that.
^KT-62340
- findCurrent() is used by the build of Kotlin/Native compiler itself.
It happens indirectly, via AppleConfigurables.
- CurrentXcode invokes xcrun command line tool in its implementation.
- Configuration cache prohibits calling external commands
All three factors combined make K/N compiler build incompatible with CC.
By using xcodeOverride, K/N compiler build can provide its own Xcode
instance avoiding calling external commands when it's not allowed by CC.
There are two types of type lists that can be met in Kotlin metadata
and that should be treated in a different way:
1. The order-sensitive type list. Examples: Context receivers.
2. The order-insensitive type list. Examples: Class supertypes,
type parameter upper bounds.
With (1) swapping elements in list causes source and/or ABI
incompatibility, while with (2) it does not. If it happens that we
compare two type lists in Kotlin metadata of (2) kind, we should group
them using the key computed with the help of
`dumpToString(dumpExtras = false)` instead of just the index as we do
in case of (1).
^KT-62753
When using DeepCopyIrTreeWithSymbols as class transformer to transform
the IrClass, the source element of IrClass was set to
SourceElement.NO_SOURCE after the transform.
^KT-65343 Fixed
Before this commit, the expect-actual resolver could find expects in
regular dependencies
Note: The appeared `VIRTUAL_MEMBER_HIDDEN` in
compiler/fir/analysis-tests/testData/resolveWithStdlib/multiModule/FakeOverrides.kt
isn't caused by my change. It's caused by fixing the testData dependency
syntax notation.
The testData improperly used regular dependency syntax notation, while
it should have been using dependsOn
Before:
Regular dependency syntax notation
// MODULE: androidMain(commonMain)
After:
dependsOn dependency syntax notation
// MODULE: androidMain()()(commonMain)
`originalCallee` is supposed to be the owner of the original call.
It can be a fake override, and in the inliner we are using actual
function with body. Apparently we can just stick with the resolved
function.
#KT-64807
The previous one was incorrect for K1 since parent of top-level function
is `IrClass`, not `IrPackageFragment`.
The change is non-functional, K1 still worked correctly, but had to do
some extra work when inlining `emptyArray` calls and produces less
performant bytecode.
It was a workaround for case, where expect class don't have
override of abstract function. We don't allow it anymore,
so it can be dropped to make correct modality comparation.
^KT-65971
This fixes some crashes on red code in diagnostic tests.
Also can be useful in the future, when we would allow things like
enum.name in annotation arguments.
^KT-65971
Otherwise, when analyzing
`PsiTypeParameterListOwner` in the
related test, we (after flattening and
`nonSubsumed()`) get 2 `JvmMember.accept`
from the same very java enhancement
scope `JvmMember`.
^KT-65972
After this change the IO created for
`SimpleColoredComponent::setToolTipText`
will be `containsMultipleNonSubsumed == true`
while IOs created for classes in
`intersectionOverridesIntersection.kt`
will have this property set to `false`.
^KT-65972 Fixed
Allow multiple bases with default
implementations as long as there's a
non-abstract symbol from a class.
Our rules for Kotlin are stricter than
those in Java.