Files
kotlin-fork/compiler/testData/diagnostics/tests/suspendConversion
Denis.Zharkov a8b9e8c44e K2: Fix false-positive TYPE_MISMATCH for suspend lambdas
Why did the problem existed?
At first, lambdas were analyzed with suspend function expected type,
because it's the WHEN-case and we propagate expected type info to
the branches.

Then, after the lambdas was introduced to the containing inference
system, we're creating ResolvedLambdaAtom using the information
from analyzed lambda's shape, but didn't use known lambda resulting
type (from which we might infer FunctionTypeKind).

So, the fix is just using that already obtained information.

^KT-57446 Fixed
2023-03-29 15:02:26 +00:00
..