There are still some places in `.fir.kt` where false-positive reports
remained. This is because of IR checker, which will be fixed in next
commit.
^KT-31636
- use a declaration source if a parameter source is null;
- ignore constructor return type to avoid
double-checking of the class itself;
- ignore constructor type parameters
obtained from the class declaration;
- ignore enum entries property (it is not checked in K1 at all);
- fix exportability check for function types;
^KT-63089 Fixed
To be more consistent with K1, certain diagnostics should be reported
not on the whole properties' types, but on type arguments inside them.
Note that there is still a difference with K2 because K2 reports on a type argument
including its annotations, while K1 used KtTypeReference.typeElement.
IMO, K2 conveys the same or better meaning here, so I am willing to leave this
difference instead of providing PositioningStrategy.
#KT-53861 Fixed
After previous commits IrActualizer runs only there are at least two modules
in backend input. So to check diagnostics from Actualizer all tests
should contain at least two modules
Diagnostics in test `extendExpectedClassWithAbstractMember.kt` were
changed because there is an exception from IrActualizer caused by
errors from frontend (`ABSTRACT_METHOD_NOT_IMPLEMENTED`), which is
swallowed by this kind of tests
Fir2Ir conversion consists of multiple steps with complex logic (like
conversion of each module, actualization, plugins application, constant
evaluation), and to ensure that they all are executed correctly it's
convenient to have the single entry point for all this machinery
`fir2IrComponents`, `irActualizerResult` and `dependentIrModuleFragments`
were used in `IrActualizerAndPluginsFacade`, which was removed in the
previous commit
IR actualization and IR plugins will be moved into base Fir2Ir facades
in the following commits, so this facade is not needed anymore
It was easier and cleanlier to remove this facade first and only after
that modify base facades
This fixes processing of annotations on enum entries.
Before, the check in BodyResolveContext.forAnnotation would set the
tower data mode to CLASS_HEADER_ANNOTATIONS because no containers were
present.
This would lead to some tower data elements like nested classifiers
missing, which would lead to false positive unresolved references.
#KT-63761 Fixed
As they would clash with the ones that is intended to be consumed as
project dependencies. It will not be compatible with future Gradle
versions. This should be fixed with KT-49919
^KT-60879
Starting from Gradle 8.2 there is deprecation diagnostic that
disallows changing configuration roles after creation.
With Gradle 8.4 there is an Incubating API that introduces
role factories for Configuration. For consistency reasons names that
introduced in this commit match the names that Gradle introduces in 8.4
version.
^KT-60879
Workspace Model will return a copy of CompilerSettings instead of reference to the original one. Thats why we need to add listeners on it on IJ side
Relates to KTIJ-24647
This commit does two things:
- prioritize type parameter scopes against static scopes in body resolve
(effectively it's a revert of KT-58028 fix)
- consider type parameters as inapplicable callable, so during callable
resolve we can go up the tower and still resolve to static scope
This allows both KT-58028 and KT-63377 to work properly
#KT-63377 Fixed
FirDefaultArgumentsInExpectActualizedByFakeOverrideChecker is an adhoc
checker which can be converted to ExpectActualCheckingCompatibility to
reuse common expect-actual checking infrastructure.
^KT-62913 Fixed
Review: https://jetbrains.team/p/kt/reviews/13094/timeline
Tests that were broken by one of my previous commits are now fixed:
- actualFakeOverride_paramsAreCompatibleViaSharedMethodWithDefaultParams.kt
- inheritedJavaMembers.kt
DEFAULT_ARGUMENTS_IN_EXPECT_ACTUALIZED_BY_FAKE_OVERRIDE diagnostic
disappeared in delegation.fir.kt because only one
AbstractExpectActualChecker incompatibility can be reported at a time
(DEFAULT_ARGUMENTS_IN_EXPECT_ACTUALIZED_BY_FAKE_OVERRIDE is now reported
not by adhoc checker but by common AbstractExpectActualChecker). It
would be nice to report both of them, but it's a separate issue KT-62631
delegation2 test makes sure that
DEFAULT_ARGUMENTS_IN_EXPECT_ACTUALIZED_BY_FAKE_OVERRIDE is reported when
NO_ACTUAL_CLASS_MEMBER_FOR_EXPECTED_CLASS is fixed