aboutsummaryrefslogtreecommitdiff
path: root/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka
diff options
context:
space:
mode:
authorVadim Mishenev <vad-mishenev@yandex.ru>2022-03-28 18:26:29 +0300
committerGitHub <noreply@github.com>2022-03-28 18:26:29 +0300
commit57133de2fef1be68d9f05e6c262c31288de6cbcd (patch)
tree93ab537a9c1783d6f9dbf97534da5a8ab19eb2d1 /kotlin-analysis/src/main/kotlin/org/jetbrains/dokka
parent414475f9f87a9bc49b0a27f8cc4c690d6910a13e (diff)
downloaddokka-57133de2fef1be68d9f05e6c262c31288de6cbcd.tar.gz
dokka-57133de2fef1be68d9f05e6c262c31288de6cbcd.tar.bz2
dokka-57133de2fef1be68d9f05e6c262c31288de6cbcd.zip
Bug resolving in ultralightmethod (#2400)
Diffstat (limited to 'kotlin-analysis/src/main/kotlin/org/jetbrains/dokka')
-rw-r--r--kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt12
1 files changed, 9 insertions, 3 deletions
diff --git a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt
index 0d159374..393a2c62 100644
--- a/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt
+++ b/kotlin-analysis/src/main/kotlin/org/jetbrains/dokka/analysis/AnalysisEnvironment.kt
@@ -49,6 +49,7 @@ import org.jetbrains.kotlin.idea.klib.KlibLoadingMetadataCache
import org.jetbrains.kotlin.idea.klib.getCompatibilityInfo
import org.jetbrains.kotlin.js.config.JSConfigurationKeys
import org.jetbrains.kotlin.js.resolve.JsPlatformAnalyzerServices
+import org.jetbrains.kotlin.library.KLIB_FILE_EXTENSION
import org.jetbrains.kotlin.library.ToolingSingleFileKlibResolveStrategy
import org.jetbrains.kotlin.library.resolveSingleFileKlib
import org.jetbrains.kotlin.load.java.structure.impl.JavaClassImpl
@@ -75,7 +76,6 @@ import org.jetbrains.kotlin.resolve.jvm.platform.JvmPlatformAnalyzerServices
import org.jetbrains.kotlin.resolve.konan.platform.NativePlatformAnalyzerServices
import java.io.File
import org.jetbrains.kotlin.konan.file.File as KFile
-import org.jetbrains.kotlin.library.KLIB_FILE_EXTENSION
const val JAR_SEPARATOR = "!/"
@@ -478,7 +478,7 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
projectContext.withModule(descriptor),
modulesContent(moduleInfo),
this,
- LanguageVersionSettingsImpl.DEFAULT,
+ configuration.languageVersionSettings,
CliSealedClassInheritorsProvider,
)
@@ -490,7 +490,13 @@ class AnalysisEnvironment(val messageCollector: MessageCollector, val analysisPl
val languageVersion = LanguageVersion.fromVersionString(languageVersionString) ?: LanguageVersion.LATEST_STABLE
val apiVersion =
apiVersionString?.let { ApiVersion.parse(it) } ?: ApiVersion.createByLanguageVersion(languageVersion)
- configuration.languageVersionSettings = LanguageVersionSettingsImpl(languageVersion, apiVersion)
+ configuration.languageVersionSettings = LanguageVersionSettingsImpl(
+ languageVersion = languageVersion,
+ apiVersion = apiVersion, analysisFlags = hashMapOf(
+ // force to resolve light classes (lazily by default)
+ AnalysisFlags.eagerResolveOfLightClasses to true
+ )
+ )
}
/**