J2K: visibility modifiers are no more applicable to local classes
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user