Extend import resolution for library-to-source analysis

Use composite importing scope for references when resolution anchors are enabled.
Composite scope provides additional descriptors from scope of resolution anchor module.
Overriding old importing scope with a new one is not possible as it breaks library
dependencies on other libraries, which are inaccessible in anchor scope (scope for sources).

KT-24309 In Progress
This commit is contained in:
Pavel Kirpichenkov
2020-06-15 15:36:53 +03:00
parent 8c876e4621
commit 5892bdf3f4
8 changed files with 94 additions and 2 deletions
@@ -47,4 +47,7 @@ object AnalysisFlags {
@JvmStatic
val reportErrorsOnIrDependencies by AnalysisFlag.Delegates.Boolean
@JvmStatic
val libraryToSourceAnalysis by AnalysisFlag.Delegates.Boolean
}
@@ -61,3 +61,6 @@ var CompilerConfiguration.languageVersionSettings: LanguageVersionSettings
val LanguageVersionSettings.isTypeRefinementEnabled: Boolean
get() = getFlag(AnalysisFlags.useTypeRefinement)
val LanguageVersionSettings.isLibraryToSourceAnalysisEnabled: Boolean
get() = getFlag(AnalysisFlags.libraryToSourceAnalysis)