For a class literal Type::class we are resolving Type as a constructor,
getting all diagnostics (about missing arguments, for example) and then
just not committing this trace with errors
#KT-37626 Fixed
It's not clear how one should rollback _all_ resolution results if
there is inapplicable call. Ideally, such calls should not be available
in coroutine block but for now, to have backward compatibility, we'll
just reanalyze coroutine block as a usual lambda if there is at least
one such call.
As a result, also remove diagnostic about non-applicable call as it
become useless with current reanalysis
#KT-37061 Fixed
#KT-32097 Fixed
#KT-32203 Fixed
#KT-35306 Fixed
#KT-36202 Fixed
#KT-36220 Fixed
#KT-32654 Fixed
In this test `kotlin` was resolved to the extension
`val Class<T>.kotlin` because it was saved in builder-inference.
Usually, it's fine, but not for qualified expressions as they have
fallback resolve in case of error
#KT-36247 fixed
A lot of testdata changed because significanly less (error) descriptors
are created for unresolved types, so diagnostics became different.
Reported diagnostics from the call checkers didn't get to a top-level
trace, if an intermediate wrapping call was a lambda call.
Use of the top-level trace in call completer is a workaround for
the unreliable commit order of common calls' temporary traces.
^KT-33542 Fixed
There are no `DEBUG_INFO_MISSING_UNRESOLVED` diagnostics for this test
if one runs it under LV=1.2. These diagnostics are not crucial
for the test (especially for version 1.2), so use it only with
the latest stable version
Plus, reuse test-data to check behavior in new inference
This call have interesting rules for resolution, see
`KtQualifiedExpression.elementChain` function and it's usages:
resolution results for such call can be omitted and be replaced with
some other information, while diagnostics will be reported from
builder-inference.
To mitigate this problem, we'll just skip this call from builder-inference
as such calls can't have type parameters anyway
#KT-32094 Fixed
Also that commit removes usages of builtins inside
effect system and starts refactoring of functor
composition via composition instead of inheritance.
There are some changes in testdata related to inference of recursive
functions with implicit return types.
After this commit they all are marked as unresolved. It happens because
those functions have DeferredType as return type, and computing this
type produces recursive exception, which provides “typechecker
recursive problem” diagnostic.
Before this commit, function call was completed successfully, because
call completer didn’t computed that type, and computation of DeferredType
were triggered only in `DataFlowAnalyzer.checkType`.
Now, effect system tries to compute that type while wrapping KotlinTypes
into ESTypes, and effect system itself is triggered in in call completer,
so, call completion doesn’t finish and function call is marked as unresolved.
#KT-31364
These tests were added for suspend-conversions, it worked only
with new inference, but implementation was incorrect and had other
bugs, which were fixed in 1ac25259.
Support of suspend-conversions will be addressed later with a different
implementation (#KT-30703)