[FE] Change message for sealed interfaces with language target < 1.5

This commit is contained in:
Dmitriy Novozhilov
2021-02-16 12:43:25 +03:00
parent 8521d844e2
commit cdf7de5524
3 changed files with 3 additions and 3 deletions
@@ -18,6 +18,6 @@ object SealedInterfaceAllowedChecker : DeclarationChecker {
if (descriptor !is ClassDescriptor) return
if (descriptor.kind != ClassKind.INTERFACE) return
val keyword = declaration.modifierList?.getModifier(KtTokens.SEALED_KEYWORD) ?: return
context.trace.report(Errors.WRONG_MODIFIER_TARGET.on(keyword, KtTokens.SEALED_KEYWORD, KotlinTarget.INTERFACE.description))
context.trace.report(Errors.UNSUPPORTED_FEATURE.on(keyword, LanguageFeature.SealedInterfaces to context.languageVersionSettings))
}
}