Expect/actual support in klibs under -Xklib-mpp
This commit is contained in:
committed by
alexander-gorshenev
parent
218d7c31ed
commit
dc8240c24e
@@ -12,6 +12,9 @@ object AnalysisFlags {
|
||||
@JvmStatic
|
||||
val multiPlatformDoNotCheckActual by AnalysisFlag.Delegates.Boolean
|
||||
|
||||
@JvmStatic
|
||||
val klibBasedMpp by AnalysisFlag.Delegates.Boolean
|
||||
|
||||
@JvmStatic
|
||||
val experimental by AnalysisFlag.Delegates.ListOfStrings
|
||||
|
||||
|
||||
@@ -44,6 +44,9 @@ object CommonConfigurationKeys {
|
||||
|
||||
@JvmField
|
||||
val USE_FIR = CompilerConfigurationKey.create<Boolean>("front-end IR")
|
||||
|
||||
@JvmField
|
||||
val KLIB_MPP = CompilerConfigurationKey.create<Boolean>("Klib based MPP")
|
||||
}
|
||||
|
||||
var CompilerConfiguration.languageVersionSettings: LanguageVersionSettings
|
||||
|
||||
+2
@@ -54,6 +54,8 @@ class ExpectedActualDeclarationChecker(
|
||||
|
||||
override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) {
|
||||
if (!context.languageVersionSettings.supportsFeature(LanguageFeature.MultiPlatformProjects)) return
|
||||
// TODO: we need a klib based MPP aware ModuleStructureOracle. Just disable the checks for now.
|
||||
if (context.languageVersionSettings.getFlag(AnalysisFlags.klibBasedMpp)) return
|
||||
|
||||
// Note that this check is necessary, because for default accessors KtProperty is passed for KtDeclaration, so this
|
||||
// case won't be covered by the next check (also, it accidentally fixes KT-28385)
|
||||
|
||||
Reference in New Issue
Block a user