- completion-ranking-kotlin jar used to be in the IDEA itself; thanks to new extension it can reside in the plugin from now on
- ML completion is turned off by default
- use `implementation` dependency because `completion-ranking-kotlin` is required during runtime
Consider a call like `select(1, "")`, the resulting type for it is
Comparable<Int & String> & Serializable.
After variable fixation, the compiler incorporates this type into the
constraint system to check for a contradiction, so it checks
applicability of argument to the resulting type.
In other words, for the above call it checks is
`Comparable<Int & String> & Serializable` subtype of `IntegerLiteralType`?
Which ends up in checking is `IntegerLiteralType` subtype of `Int & String`.
Before this commit, such check was leading to the false result, but
because of losing diagnostic (which was fixed in the previous commit:
29f591b1), there was no error
These changes allow us to accurately distinguish between statements and
expressions in the IR.
This also fixes the types of non-exhaustive conditional statements.
We should only insert a return statement at the end of a lambda or
function if the final statement is used as an expression (slice
USED_AS_RESULT_OF_LAMBDA and USED_AS_EXPRESSION).
- Added tests to demonstrate broken behaviour: the interaction of inline
functions and callable references with varargs and defaults in various
combinations.
- Refactored InlineCallableReferencesToLambdaPhase to look like and use
some of the infrastructure from CallableReferenceLowering.
- Lifted some of this infrastructure out to be broadly reusable.
Take branching and method calls into account when finding the line
number of the continuation. If there is no line number before
branching instructions or method calls, the following code is
still on the line of the suspend call itself.
This fixes a couple of issues with incorrect line numbers for
multiple throws on the same line or multipe suspend calls on
the same line.
In addition, it avoids the need to spam the method node with
repeated line number instructions in the IR backend.
In constructor stubs for default arguments, a marker parameter used
to have a non-null type, but null was passed as the corresponding
argument. This patch corrects the type.