FirJavaMethod and FirJavaConstructor are implementation classes.
It's anyway not good to check subtyping using them,
because it makes the code implementation-dependent.
This commit begins to check Java origin instead.
We used this classId to get an associated symbol,
but this way is anyway not recommended (e.g. problems with local classes).
In this commit we migrated to usage of lookup tags instead.
^KT-64121 Fixed
Review: https://jetbrains.team/p/kt/reviews/13495/timeline
If we generate these declarations then the compiler sees Any.{toString,
equals, hashCode} non-synthetic declarations of common metadata and
reports false positive ACTUAL_MISSING during intermediate (HMPP)
metadata compilation.
See the review for more details
This should keep compatability with user scripts that for any reason tried to configure 'sourceSets' container inside KotlinTarget, but keep such users warned.
^KT-57292 In Progress
The purpose of this annotation is to distinguish different levels of DSL
in KGP:
- top level extension
- target level DSL
- compilation level DSL
With this marker user should not be able to call implicit methods from
upper levels of DSL, and it should reduce confusion with DSL usage.
^KT-57292 In Progress
This is an internal annotation that eventually should go away, and the
name is clashing with more public annotation is going to be introduced
in the API project.
^KT-57292 In Progress
Before this commit, we assumed (erroneously) that a captured type
cannot have an associated SAM-based function type.
In this commit we changed this assumption, replacing a captured type
with its lower type for this purpose
#KT-63379 Fixed
We should use the declaration-site session to have stable
resolution order. The same scheme is applicable during
regular lazy resolution calls.
Also, this means that we should process 'expect' classes
before 'actual' like it was for 'super' and 'sub' classes
^KT-63547
LLFirSession should be received from LLFirResolveTarget to avoid
potential wrong sessions
ScopeSession cannot be dropped yet as we should be able to use another
session during on-air resolution to avoid garbage in the original one
^KT-63547
We should use the declaration-site session to have stable
resolution order. The same scheme is applicable during
regular lazy resolution calls
^KT-63547
We should use the declaration-site session to have stable
resolution order. The same scheme is applicable during
regular lazy resolution calls.
^KT-63547 Fixed
We should use the declaration-site session to have stable
resolution order. The same scheme is applicable during
regular lazy resolution calls.
Also, this means that we should process 'expect' classes
before 'actual' like it was for 'super' and 'sub' classes
^KT-63547
We cannot skip resolution in the case of type actualization as we cannot
guaranty that there are no any classes in super types which can be
actualized in the current context
^KT-62832 Fixed
^KT-63547
Before this commit, we discriminated particular candidates with callable
reference adaptations during resolution stages.
After disabling compatibility mode for new inference, it's not so,
but now we discriminate similar candidates in ConeOverloadConflictResolver;
more precisely, it's candidates with callable reference adaptation
in their postponed atoms.
This does not allow going up the tower,
but allows to select better candidate at similar tower level.
Related to KT-63558, KT-64307, KT-64308
Before this commit, we discriminated particular candidates with SAM
during resolution stages. More precisely, candidates from Kotlin
which used Java SAM types, were discriminated allowing go up the tower
for better candidates. After disabling compatibility mode for new
inference, it's not so, but now we discriminate similar candidates
in ConeOverloadConflictResolver. This does not allow going up the tower,
but allows to select better candidate at similar tower level.
Related to KT-63558, KT-64306
Otherwise, if complex expressions such as when expressions are
used in combination with the intrinsics we get incorrect stepping
behavior.
^KT-64341 Fixed
Previously, we tried to sync existing Java SourceSet resources into
KotlinSourceSet and then replace Java one from Kotlin. For such an
approach, we called 'files' on existing resources, but this does not
carry information about producing task dependency.
This fix goes a little further and just replaces default KotlinSourceSet
'resources' SourceDirectorySet with a similar object from Java
SourceSet, so any change to Java or Kotlin resources is reflected in
both.
^KT-62490 Verification Pending
The problem from KT-63624 was that during matching phase we must choose
only one candidate, but in Java we can have two successfully matched
properties: 1) from field and 2) from method, which overrides Kotlin
property.
See test `propertyAgainstJavaPrivateFieldAndPublicMethod.kt`.
As a result, we choose field candidate, throw away method candidate, and
then fail during visibility check.
Instead of inventing special rule of prioritizing field over method
it was decided to prohibit actualization to Java field at all because:
1. It doesn't seem that Java fields actualization was implemented in K1
on purpose
2. People usually don't use public Java fields, and use instead
private field + getter, especially when compatibility is important, so
it shouldn't be a breaking change
Besides that, such solution simplifies code and is consistent with
the current logic of matcher, which doesn't expect that two members
can be matched successfully. Also, it fixes KT-63624 and KT-63667.
^KT-63624 Fixed
^KT-63667 Fixed
During the fix of KT-62525, we've forbidden to use lambda parameters
with inaccessible types at all. After it, some impact was noticed,
so we decided to forbid them only in case it's necessary
(the case when associated types have type arguments, see KT-62525
description), and to deprecate them in other cases.
#KT-64266 Fixed