[SLC] Fix modifiers for @JvmStatic methods in interfaces
This commit is contained in:
committed by
Space Team
parent
253cdb1b8f
commit
9204f8162e
@@ -39,10 +39,10 @@ private class KtUltraLightMethodModifierList(
|
||||
owner: KtUltraLightMethod,
|
||||
val delegate: PsiMethod,
|
||||
) : KtUltraLightModifierList<KtUltraLightMethod>(owner, support) {
|
||||
override fun hasModifierProperty(name: String) = when {
|
||||
override fun hasModifierProperty(name: String): Boolean = when {
|
||||
name == PsiModifier.ABSTRACT && isImplementationInInterface() -> false
|
||||
// pretend this method behaves like a default method
|
||||
name == PsiModifier.DEFAULT && isImplementationInInterface() -> true
|
||||
name == PsiModifier.DEFAULT && isImplementationInInterface() && !hasModifierProperty(PsiModifier.STATIC) -> true
|
||||
name == PsiModifier.FINAL &&
|
||||
(owner.containingClass.safeAs<KtLightClassForSourceDeclaration>()?.isPossiblyAffectedByAllOpen() == true)
|
||||
-> delegate.hasModifierProperty(name)
|
||||
|
||||
Reference in New Issue
Block a user