Before that, implicit invoke call were inserted only for
double-brackets expressions (like `foo()()`)
In fact, it is intended to be present in every place where `invoke`
function is used as an operator:
`foo()` - `invoke` operator usage, should be `ImplicitInvokeCall`
`foo.invoke()` - `invoke` function used, should be simple `FunctionCall`
Also, handle implicit invokes in `FirDelegatedPropertyChecker`
Effectively solved by rearranging order of lines - runtimeJar() should
be used after publish(). Otherwise, jar task is not registered as
dependency for publication, and publication misses the main jar.
#KTI-637 Fixed
- Materialize unit when its value is actually needed.
- Special-case Unit_getInstance return type at codegen. It should be a
proper Unit object instead of a "void"
See KT-48291 for example.
The rationale behind the change is that in "findExpectForActual" we want
to find a candidate to be a counterpart for the current (actual)
declaration. Fake overrides can not be a sensible counterpart in that
regard (you can't, nor you should, provide actual for expect which is
FAKE_OVERRIDE)
^KT-48291 Fixed
`ValueParameterData.hasDefaultValue` is now always equal to the original
value parameter's `declaresDefaultValue` flag, so `ValueParameterData`
usages can be simplified to just `KotlinType`.
The change in signatureEnhancement.kt in 432f581cb2 was incorrect.
Contrary to its name, the removed method `hasDefaultValueInAnnotation`
checked not only if the enhancement annotation has default value (which
is what the removed feature was about), but also if the parameter itself
declares default value. This was mistakenly substituted by just `false`
on line 234. The correct change is to use the `declaresDefaultValue`
flag of the original parameter.
It's kind of weird though that in case there's a nullability annotation
on the whole package (like in KT-48316) type enhancement is being done
on everything, including annotation constructors, whose parameter types
can't have any enhancement information. Maybe this should be improved
independently.
#KT-48316 Fixed