When fixing KT-22004, the analysis was incomplete, the details are
available at KT-63540. This change restricts the ignore of conflicting
overloads on hidden callables only for final ones.
^KT-63540 Fixed
Previously, because we didn't handle flexible types properly in
prepareCapturedType, projections inside flexible types would only be
captured during subtyping with captureStatus=FOR_SUBTYPING
which would lead to the constraint type being wrongly approximated
(see ConstraintInjector.TypeCheckerStateForConstraintInjector
.addNewIncorporatedConstraint).
Fixing the capturing produced two kinds of false positive diagnostics:
1. In ConstraintInjector.TypeCheckerStateForConstraintInjector
.addNewIncorporatedConstraint we would get two instances of cone types
that are structurally equal and containing the same captured type.
However, because we only skipped subtyping if the types were
referentially equal, we would get a contradiction here.
The fix was to use structural equality instead, which should be okay
as the captured type instances are the same.
2. Reified type variables were inferred to captured types because
flexible arrays with captured upper bounds
(Array<Foo>..Array<Captured(out Foo)>?) were not properly approximated.
#KT-62609 Fixed
The rule is: no cast is required iff the argument type is a
non-reflection function type and a subtype of the expected
function type.
We approximate the cone types using the FIR2IR specific config
to account for intersection types, captured types, etc.
#KT-63345 Fixed
#KT-63510
#KT-62865
Rework rendering of kt-like dump and signatures dump in order to avoid
unstable blank line between declarations of the same level:
1. No blank line for the first declaration inside the member scope of
the class.
2. Always a single blank line between each two subsequent declarations
inside the member scope of the class.
Making enum class-related tests unmuted requires implementing
a special "compatibility" mode for IR tree dumper to filter out
fake override declarations leaking from java.enum.Enum and
kotlin.Enum (JVM-only) classes.
1. Local declarations don't participate in IR-linkage, because they
can be referenced only inside the same body -> can be dropped
from IR text tests.
2. Mangled names for private declarations computed by descriptors/fir
are actually not used anywhere (they are recomputed by IR
immediately before serialization of IR). But sometimes such
mangled names diverge between K1 and K2 -> don't check them, but
always check mangled names computed by IR even for private
declarations.
3. Also: Drop DUMP_LOCAL_DECLARATION_SIGNATURES test directive.
^KT-57428 Obsolete
^KT-57430 Obsolete
^KT-57434 Obsolete
^KT-57778 Obsolete
^KT-57775 Obsolete
Code generation for the intrinsic `jvmDebuggerInvokeSpecialIntrinsic`
includes dispatch receiver, but ignores arguments
passed to a super-call. This change passes arguments in the IR
representation in an array, and during the codegen the array is
unpacked and the bytecode is generated for the elements,
right before generating the actual `INVOKESPECIAL`.
#KT-63848 fixed
Merge-request: KT-MR-13270
Merged-by: Alexander Kuznetsov <Aleksander.Kuznetsov@jetbrains.com>
Refactorings: rework testData to better reflect usages of declarations,
clean up internal test methods.
Merge-request: KT-MR-13232
Merged-by: Evgenii Mazhukin <evgenii.mazhukin@jetbrains.com>
`Generate Compiler Tests` configuration is not working properly
because it doesn't include analysis api test generator. It was decided
to keep only one generate configuration for tests.