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 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.
A class can inherit two declarations that are compatible from the
overridability standpoint and are therefore combined to a non-trivial
intersection.
At the same time, the class can declare a member declaration that
only overrides one of the intersection's members.
In this case, we break up the intersection and only add the overridden
parts to the declared member's direct overridden list.
If the class doesn't override the intersection, it exists as
intersection override, like before.
#KT-65487 Fixed
In general, overrides should not
contain default values, and it's
better to make fake overrides be close
to proper overrides as much as
possible. It will be important when
we begin running `FirOverrideChecker`
for fake overrides.
^KT-63879 Fixed
^KT-65534
Previously we forced computation only for java and precompiled classes,
assuming, that binary class can not extend source class, but it's not
true in two cases:
1. Classpath substitution: class with same name declared in library and
the source (more rare case)
2. Metadata compilation: depends-on dependcies are passed in binary
format, so `expect class` may be a binary one and corresponding
`actual class` may be a source. So if some class in `common` module
extend this expect class, actual class will be substituted instead of it
^KT-65669 Fixed
This annotation leads to conflicting overloads error supression,
in case where several function with the same argument types,
but different argument names are inherited from ObjC class.
We need to implement it in both K1 and K2 to make the IDE experience
better.
But the annotation itself wouldn't be available in K1.
^KT-61323
This is needed because in case a static member is inherited via a Kotlin
class (class C in the newly added test), its origin becomes
FAKE_OVERRIDE which is technically not Java anymore. After this change,
we'll build fake overrides for static members from superclasses
regardless of whether they come from Java or Kotlin.
Also, move the previous logic of
isOverridableFunction/isOverridableProperty to the only call site at
IdSignatureFactory.
#KT-65589 Fixed
Before this commit, fir f/o builder was inconsistently
disabled in some places, while it should work only for lazy declarations
Attempt to use it for non-lazy declarations, without maintaining
invariant, that it would also be used for super classes
led to unpredictable results.
This commit introduces opt-in, and marks all related API to three types
* Propagate error to user
* Fine to use, as it's checked if ir f/o builder is enabled
* Fine to use, as it is definitely a lazy class.
Several cases of missing checks was fixed.
^KT-65707
Java annotation interface fields are constant declarations that can
have any Java type and are not restricted in the same way that
method return types are for annotation interfaces.
#KT-65482 Fixed