Fix compilation error in :noarg-ide-plugin

Was overlooked in a06bffc4b9.
This commit is contained in:
Alexander Udalov
2020-12-05 00:59:18 +01:00
parent 69be56d042
commit c87edc44f3
2 changed files with 3 additions and 3 deletions
@@ -35,7 +35,7 @@ internal class CliNoArgDeclarationChecker(
override fun getAnnotationFqNames(modifierListOwner: KtModifierListOwner?): List<String> = noArgAnnotationFqNames override fun getAnnotationFqNames(modifierListOwner: KtModifierListOwner?): List<String> = noArgAnnotationFqNames
} }
internal abstract class AbstractNoArgDeclarationChecker(private val useIr: Boolean) : DeclarationChecker, AnnotationBasedExtension { abstract class AbstractNoArgDeclarationChecker(private val useIr: Boolean) : DeclarationChecker, AnnotationBasedExtension {
override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) { override fun check(declaration: KtDeclaration, descriptor: DeclarationDescriptor, context: DeclarationCheckerContext) {
if (descriptor !is ClassDescriptor || declaration !is KtClass) return if (descriptor !is ClassDescriptor || declaration !is KtClass) return
if (descriptor.kind != ClassKind.CLASS) return if (descriptor.kind != ClassKind.CLASS) return
@@ -15,10 +15,10 @@ import org.jetbrains.kotlin.psi.KtModifierListOwner
internal val NO_ARG_ANNOTATION_OPTION_PREFIX = internal val NO_ARG_ANNOTATION_OPTION_PREFIX =
"plugin:${NoArgCommandLineProcessor.PLUGIN_ID}:${NoArgCommandLineProcessor.ANNOTATION_OPTION.optionName}=" "plugin:${NoArgCommandLineProcessor.PLUGIN_ID}:${NoArgCommandLineProcessor.ANNOTATION_OPTION.optionName}="
class IdeNoArgDeclarationChecker(project: Project) : AbstractNoArgDeclarationChecker() { class IdeNoArgDeclarationChecker(project: Project) : AbstractNoArgDeclarationChecker(false) {
private val cachedAnnotationNames = CachedAnnotationNames(project, NO_ARG_ANNOTATION_OPTION_PREFIX) private val cachedAnnotationNames = CachedAnnotationNames(project, NO_ARG_ANNOTATION_OPTION_PREFIX)
override fun getAnnotationFqNames(modifierListOwner: KtModifierListOwner?): List<String> = override fun getAnnotationFqNames(modifierListOwner: KtModifierListOwner?): List<String> =
cachedAnnotationNames.getAnnotationNames(modifierListOwner) cachedAnnotationNames.getAnnotationNames(modifierListOwner)
} }