K2: Support dependency symbol providers for binary libraries
When a symbol X from a binary library A uses another symbol Y from another binary library B, `LLFirDependenciesSymbolProvider` cannot resolve Y for X. This is because the existing LLFirAbstractSessionFactory passes symbol providers for only builtin libraries to `LLFirDependenciesSymbolProvider` even when the session has dependencies. As a result, when `LLFirDependenciesSymbolProvider` searches a symbol, it can find only symbols from the builtin libraries, but it cannot find a symbol from libraries other than builtin libraries. This happens only for the binary libraries. ^KT-65240 Fixed
This commit is contained in:
+6
-1
@@ -85,7 +85,12 @@ internal abstract class LLFirAbstractSessionFactory(protected val project: Proje
|
||||
builtinTypes,
|
||||
scope
|
||||
),
|
||||
LLFirDependenciesSymbolProvider(session) { listOf(builtinSymbolProvider) },
|
||||
LLFirDependenciesSymbolProvider(session) {
|
||||
buildList {
|
||||
addAll(collectDependencySymbolProviders(moduleData.ktModule))
|
||||
add(builtinSymbolProvider)
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user