Disable "Make constructor internal" for annotations #KT-17599 Fixed

This commit is contained in:
shiraji
2017-04-28 05:17:46 +03:00
committed by Mikhail Glukhikh
parent d542aef7e4
commit 6f94f45409
3 changed files with 14 additions and 1 deletions
@@ -119,5 +119,10 @@ open class ChangeVisibilityModifierIntention protected constructor(
}
}
class Internal : ChangeVisibilityModifierIntention(KtTokens.INTERNAL_KEYWORD)
class Internal : ChangeVisibilityModifierIntention(KtTokens.INTERNAL_KEYWORD) {
override fun applicabilityRange(element: KtDeclaration): TextRange? {
if (isAnnotationClassPrimaryConstructor(element)) return null
return super.applicabilityRange(element)
}
}
}