Many errors are reported in stdlib with these annotations
(SinceKotlin, Deprecated, so on).
But having them only on expect is a valid case. E.g. SinceKotlin added
if some old platform-specific API becomes commonized.
^KT-58551
This implementation only checks annotations set on expect/actual
declarations and requires further refinement (e.g. checking of other
annotation targets, class scopes within typealiases).
^KT-58551
A new resolution diagnostic UnsuccessfulCallableReferenceAtom is
introduced that is used in EagerResolveOfCallableReferences.
No diagnostic is reported on unresolved calls with this diagnostic
because
#KT-59856
This allows us to properly complete array literals arguments of
annotation calls fixing several false-negative type mismatch errors
as well as enabling the inference of generic type arguments.
#KT-59581 Fixed
#KT-58883 Fixed
This lets us properly complete the call which fixes some issues with
false-positive type mismatches.
This change doesn't apply to array literals in annotation calls yet
because they are resolved as context-dependent.
This will be adapted in a following commit.
#KT-59581
It is required to avoid leakage of annotations instance from
the original type
It should be enough to just create a new instance of an annotation
without a deep copy, because transformer shouldn't touch it
^KT-60387 Fixed
Support CALL_TO_JS_MODULE_WITHOUT_MODULE_SYSTEM diagnostic
^KT-59377 Fixed
Support CALL_TO_JS_NON_MODULE_WITH_MODULE_SYSTEM diagnostic
^KT-59381 Fixed
Support CALL_FROM_UMD_MUST_BE_JS_MODULE_AND_JS_NON_MODULE diagnostic
^KT-59417 Fixed
Use it in diagnostic tests with JVM backend instead of the
RENDER_DIAGNOSTICS_FULL_TEXT directive.
This is needed because otherwise in
AbstractDiagnosticsTestWithJvmBackend there are two handlers trying to
dump full diagnostic texts: JvmBackendDiagnosticsHandler and
FirDiagnosticsHandler, which dump different diagnostics (reported by
backend vs frontend) and in slightly different formats.
In fact, this is why exceptionFromInterpreter.fir.diag.txt was added in
48484368c7: the existing .diag.txt was detected as incorrect by
FirDiagnosticsHandler (even though the diagnostics are the same, just
printed in a different way), which led to the creation of .fir.diag.txt.
For these tests, the behavior about checking diagnostic text in
FirDiagnosticsHandler is useless because it doesn't include backend
diagnostics. So we disable it by using another directive.
Remove the "_ir" suffix. It was originally used to distinguish tests on
the JVM IR backend from the old JVM backend ("_old"), but the latter are
removed now.
Also take into account diagnostics reported via
GenerationState.collectedExtraJvmDiagnostics, and render them in the
similar format to KtDiagnostic.
Don't make the test pass if the reported list of diagnostics is empty,
because that defeats the purpose of the test.
Instead of checking for only open declarations, check for overridable
declarations, since private declarations cannot be overridden even if
they are marked as open. While normally these modifiers are exclusive,
a declaration can be made open via a compiler plugin like AllOpen.
#KT-60183 Fixed
#KT-57223 Fixed
Inject delegated constructor and other in-place initializer sub-graphs
after the delegated constructor call node. This ensures property
initialization and use is calculated correctly when there are complex
calculations for the arguments to the delegated constructor.
#KT-59708 Fixed
#KT-59832 Fixed