K2: Use deserialized type annotation for lambda type resolution.

This commit adds code to check whether a deserialized cone type is a
special function type kind or not when resolving the type of a lambda
expression (anonymous function). If it is a special function kind, it
sets the type of lambda based on the special function kind.

^KT-64994 Fixed
This commit is contained in:
Jaebaek Seo
2024-02-12 16:58:43 -08:00
committed by Space Cloud
parent 10a422180a
commit 171ea3571c
19 changed files with 406 additions and 5 deletions
@@ -48,7 +48,7 @@ private typealias ModulesByName = Map<String, KtModuleWithFiles>
* - For [TestModule] A and B, where A has dependency on B, A will never appears earlier than B in the result list.
*/
private fun sortInDependencyPostOrder(testModules: List<TestModule>): List<TestModule> {
val namesToModules = buildMap { testModules.forEach { put(it.name, it) } }
val namesToModules = testModules.associateBy { it.name }
val notVisited = testModules.toMutableSet()
val sortedModules = mutableListOf<TestModule>()