KT.PROTECTED_MEMBER_IN_FINAL_CLASS
Protected member in final class
Kotlin classes are final by default. Thus classes which are not marked as open should not contain any protected members. Consider using private or internal modifiers instead.
Noncompliant Code
Copy
class ProtectedMemberInFinalClass {
protected var i = 0
}
Compliant Code
Copy
class ProtectedMemberInFinalClass {
private var i = 0
}