inner modifier on a class as redundant if it doesn't reference members of its outer class.
Example:
class Foo {
inner class InnerClass { // redundant `inner` modifier
fun hello() {
println("Hi!")
}
}
}
class List {
val objects = Array<Any>(42) { Any() }
inner class Iterator { // Not redundant `inner` modifier
fun next(): Any {
return objects[0]
}
}
}
After the quick-fix is applied:
class Foo {
class InnerClass { // redundant `inner` modifier
fun hello() {
println("Hi!")
}
}
}
class List {
val objects = Array<Any>(42) { Any() }
inner class Iterator { // Not redundant `inner` modifier
fun next(): Any {
return objects[0]
}
}
}