J2K: visibility modifiers are no more applicable to local classes

This commit is contained in:
Mikhail Glukhikh
2015-10-01 17:09:32 +03:00
parent 4ee1b4da84
commit 8ab746d6a3
2 changed files with 5 additions and 1 deletions
@@ -657,6 +657,10 @@ class Converter private constructor(
else if (owner is PsiField) {
modifiers = modifiers.adaptForContainingClassVisibility(owner.containingClass)
}
else if (owner is PsiClass && owner.scope is PsiMethod) {
// Local class should not have visibility modifiers
modifiers = modifiers.without(modifiers.accessModifier())
}
return modifiers
}
@@ -1,6 +1,6 @@
internal class C {
fun foo(): String {
internal class Local {
class Local {
fun foo(): String? {
return null
}