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 helps to have a primitive array instead of an array of primitives
as the type of vararg value parameter. Also, this prevents
ABI-incompatibility with the libraries (KLIBs) compiled with K1.
^KT-65588
Copying tree part happens in two stages.
1. Collect all symbols to copy and create new version of them
2. Do copy tree, replacing collected symbols
For f/o builder 1-st stage traversed more nodes, than seconds.
This led to unbound symbols in tree.
^KT-65273 Fixed
In this example, when processing
the `jso` property candidate form
the `dynamic` scope we get
`DslScopeViolation`.
When we later create the
receiver for the invoke call
(since we still call `jso {}` as
a function), we create a non-error
named reference which fails at
`toResolvedReference()`.
The included test should not fail
with exception.
^KT-65255 Fixed
Duplicated messages in testdata appeared because default renderer
renders diagnostic spans ambiguously. It shows only start position.
In fact, there are 3 failures, 2 of them distinguish only by the
diagnostic end offset. See youtrack for more information.
The issue about inconvenient rendering is KT-64989.
#KT-64608
There's an implicit contract in PCLA that the statement-level call
should be postponed iff it has something to be postponed inside.
And that contract didn't work well for string interpolation containing
some postponed calls.
Thus, we haven't run a completion results writing for them properly,
thus leaving type parameters (K from synthetic call) for expression
types instead of an inferred substituted type.
In this commit, the contract was reversed to explicitly enumerate
the cases when it's safe to resolve the candidate outside PCLA session.
See the comments at `mightBeAnalyzedAndCompletedIndependently`.
^KT-65341 Fixed
For destructing calls, the component type is used for the property type
in all cases. However, this can result in runtime and/or compilation
errors when the property is a var and changed, especially when the
component is a primitive but the property type is nullable. Instead,
only use the component type when the property is also a val.
^KT-64944 Fixed
... if the delegate happens to be a function call whose second
argument is a callable reference but not actually a provideDelegate
call.
The fix is to ensure that the call is _actually_ a desugared
provideDelegate call.
This fixes a CCE in a case where the delegate expression is a regular
function call and the second argument is a callable reference.
#KT-65165 Fixed
Pass the metadata serializer instance instead. This allows to further
reduce code duplication by introducing the common interface
`KlibSingleFileMetadataSerializer` for abstracting away K1 and K2
representation of a source file, as well as reusing
`Fir2KlibMetadataSerializer` across different backends.
KT-64392
Substitution of type arguments to non-reified type parameters may lead
to accidental reification, which should not be done (see ^KT-60174 for
examples). So, we should erase them, except the few cases.
^KT-60174: Fixed
^KT-60175: Fixed
- For synthetic calls
- For delegated constructor calls
Also, I checked that for each toResolvedReference() (beside annotations)
that converts candidate to the resolved reference,
we run `runPCLARelatedTasksForCandidate()` in the same context.
^KT-65103 Fixed