This diagnostic is reported in rare situations when
StubTypeForBuilderInference is kept as a parameter type
of for loop or lambda. Before this commit, we had in K1
"Could not load module <error module>" from IrLinker instead.
Related to: KT-52757, KT-53109, KT-63841, KT-64066
#KT-53478 Fixed
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 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
This fixes some type argument mismatch errors caused by a captured type
being approximated and then captured again.
Some places need to be adapted to work with captured types that
previously only worked with approximated types.
#KT-62959 Fixed
single builder parameter
single postponed type variable
single origin of type information
cover member properties as type info sinks;
cover extension functions as type info sinks;
cover extension properties as type info sinks;
cover extension functions as type info sources;
cover extension properties as type info sources;
cover input values of builder arguments as type info sinks;
cover input values of builder arguments as type info sources;
cover return types of builder parameters as type info sources;
relevant issues:
KT-61907
KT-61909
KT-63477
single builder parameter
single postponed type variable
single origin of type information
relevant issues:
KT-60719
KT-60720
KT-60855
KT-60877
KT-60880