a8b9e8c44e
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