IC MPP: Allow expect value classes without @JvmInline

#KT-45525 Fixed
This commit is contained in:
Ilmir Usmanov
2021-03-18 13:48:40 +01:00
committed by Space
parent 8ba4f060f0
commit 164e9034d1
6 changed files with 762 additions and 1 deletions
@@ -35,7 +35,7 @@ class JvmInlineApplicabilityChecker : DeclarationChecker {
context.trace.report(ErrorsJvm.JVM_INLINE_WITHOUT_VALUE_CLASS.on(annotationEntry))
}
if (descriptor.isValue && annotation == null) {
if (descriptor.isValue && annotation == null && !descriptor.isExpect) {
val valueKeyword = declaration.modifierList?.getModifier(KtTokens.VALUE_KEYWORD) ?: return
context.trace.report(ErrorsJvm.VALUE_CLASS_WITHOUT_JVM_INLINE_ANNOTATION.on(valueKeyword))
}